]> granicus.if.org Git - sudo/commitdiff
Fix another memory leak in init_parser().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Apr 2008 18:54:50 +0000 (18:54 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Apr 2008 18:54:50 +0000 (18:54 +0000)
gram.c
gram.y

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