aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/str.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1995-06-18 12:34:14 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1995-06-18 12:34:14 +0000
commit76da55f6bce32032bd215b490fa2f23a4158ec19 (patch)
tree91257bccf4dda92d8334ba4a74af5a2241987117 /usr.bin/make/str.c
parentecf74fe675a16224aae550dcbcc402888df14681 (diff)
downloadsrc-76da55f6bce32032bd215b490fa2f23a4158ec19.tar.gz
src-76da55f6bce32032bd215b490fa2f23a4158ec19.zip
NetBSD fixes: declare more prototypes, move .OPTIONAL in alphabet
order, prevent suffix rule, if direct or children dependances exists, forget to free v->name in var.c My fixes: fix famous ^\t\n bug, correct free order in str_end Reviewed by: bde Obtained from: NetBSD, me
Notes
Notes: svn path=/head/; revision=9254
Diffstat (limited to 'usr.bin/make/str.c')
-rw-r--r--usr.bin/make/str.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 35e50fe7dfff..2dea3380ef29 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -38,7 +38,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; */
-static char *rcsid = "$Id: str.c,v 1.3 1995/01/23 21:02:00 jkh Exp $";
+static char *rcsid = "$Id: str.c,v 1.4 1995/05/30 06:32:05 rgrimes Exp $";
#endif /* not lint */
#include "make.h"
@@ -68,8 +68,11 @@ str_init()
void
str_end()
{
- free(argv[0]);
- free((Address) argv);
+ if (argv) {
+ if (argv[0])
+ free(argv[0]);
+ free((Address) argv);
+ }
if (buffer)
free(buffer);
}