aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/str.c
diff options
context:
space:
mode:
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);
}