Fix another memory leak in init_parser().

This commit is contained in:
Todd C. Miller
2008-04-10 18:54:50 +00:00
parent f0a6827feb
commit a890d723d1
2 changed files with 4 additions and 2 deletions

5
gram.c
View File

@@ -771,6 +771,7 @@ init_parser(path, quiet)
} }
efree(priv); efree(priv);
} }
efree(us);
} }
tq_init(&userspecs); tq_init(&userspecs);
@@ -804,7 +805,7 @@ init_parser(path, quiet)
sudolineno = 1; sudolineno = 1;
verbose = !quiet; verbose = !quiet;
} }
#line 756 "y.tab.c" #line 757 "y.tab.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ /* allocate initial stack or double stack size, up to YYMAXDEPTH */
#if defined(__cplusplus) || defined(__STDC__) #if defined(__cplusplus) || defined(__STDC__)
static int yygrowstack(void) static int yygrowstack(void)
@@ -1541,7 +1542,7 @@ case 92:
yyval.member = new_member(yyvsp[0].string, WORD); yyval.member = new_member(yyvsp[0].string, WORD);
} }
break; break;
#line 1493 "y.tab.c" #line 1494 "y.tab.c"
} }
yyssp -= yym; yyssp -= yym;
yystate = *yyssp; yystate = *yyssp;

1
gram.y
View File

@@ -740,6 +740,7 @@ init_parser(path, quiet)
} }
efree(priv); efree(priv);
} }
efree(us);
} }
tq_init(&userspecs); tq_init(&userspecs);