jonab@sdcrdcf.UUCP (Jonathan Biggar) (11/17/84)
System: rn version 4.1 Bug #: 12 Priority: MEDIUM Subject: missing free() on pdp11's Index: head.c Prereq: 4.1 From: pur-ee!Physics:crl (Charles LaBrec) Description: On a machine without CACHESUBJ defined, too much subject searching and listing can run rn out of memory. In head.c, in fetchsubj(), without CACHESUBJ, if copy is false, then after the call to safecpy(), you must do a free(s), or you lose mem. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch <thisarticle". If you don't have the patch program, apply the following by hand, or get patch. *** /tmp/,RCSt1027059 Fri Oct 12 12:06:12 1984 --- /tmp/,RCSt2027059 Fri Oct 12 12:06:23 1984 *************** *** 1,4 ! /* $Header: head.c,v 4.1 84/09/24 11:47:10 lwall Exp $ * * $Log: head.c,v $ * Revision 4.1 84/09/24 11:47:10 lwall --- 1,4 ----- ! /* $Header: head.c,v 4.1.1.2 84/10/12 12:03:43 lwall Exp $ * * $Log: head.c,v $ * Revision 4.1.1.2 84/10/12 12:03:43 lwall *************** *** 1,6 /* $Header: head.c,v 4.1 84/09/24 11:47:10 lwall Exp $ * * $Log: head.c,v $ * Revision 4.1 84/09/24 11:47:10 lwall * Real baseline. * --- 1,12 ----- /* $Header: head.c,v 4.1.1.2 84/10/12 12:03:43 lwall Exp $ * * $Log: head.c,v $ + * Revision 4.1.1.2 84/10/12 12:03:43 lwall + * Added free(s) to fetchsubj(). + * + * Revision 4.1.1.1 84/09/25 13:21:49 lwall + * Branch for sdcrdcf changes. + * * Revision 4.1 84/09/24 11:47:10 lwall * Real baseline. * *************** *** 209,214 return s; else { safecpy(cmd_buf,s,CBUFLEN); /* hope this is okay--we're */ return cmd_buf; /* really scraping for space here */ } #endif --- 215,221 ----- return s; else { safecpy(cmd_buf,s,CBUFLEN); /* hope this is okay--we're */ + free(s); return cmd_buf; /* really scraping for space here */ } #endif