summaryrefslogtreecommitdiff
path: root/usr.bin/yacc/reader.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-24 01:21:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-24 01:21:37 +0000
commit695e05363173fa5d7e4d674686f3f11a864b8504 (patch)
tree4144931b716278c167dd61ea945746b523802ed0 /usr.bin/yacc/reader.c
parented022b0b65a913be0da867950dc54fd75c36ad62 (diff)
fix memory leaks; itohy@netbsd
Diffstat (limited to 'usr.bin/yacc/reader.c')
-rw-r--r--usr.bin/yacc/reader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c
index 84e8fe6fce1..18fdff56b78 100644
--- a/usr.bin/yacc/reader.c
+++ b/usr.bin/yacc/reader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reader.c,v 1.5 1996/04/21 23:45:19 deraadt Exp $ */
+/* $OpenBSD: reader.c,v 1.6 1998/11/24 01:21:29 deraadt Exp $ */
/* $NetBSD: reader.c,v 1.5 1996/03/19 03:21:43 jtc Exp $ */
@@ -847,6 +847,7 @@ get_tag()
if (c == EOF) unexpected_EOF();
if (c != '>')
illegal_tag(t_lineno, t_line, t_cptr);
+ FREE(t_line);
++cptr;
for (i = 0; i < ntags; ++i)
@@ -869,7 +870,6 @@ get_tag()
strcpy(s, cache);
tag_table[ntags] = s;
++ntags;
- FREE(t_line);
return (s);
}
@@ -1403,6 +1403,7 @@ loop:
case ';':
if (depth > 0) goto loop;
fprintf(f, "\nbreak;\n");
+ FREE(a_line);
return;
case '{':
@@ -1412,6 +1413,7 @@ loop:
case '}':
if (--depth > 0) goto loop;
fprintf(f, "\nbreak;\n");
+ FREE(a_line);
return;
case '\'':