]> granicus.if.org Git - sudo/commitdiff
Free up parser data structures in sudo_file_close().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 5 Jan 2008 18:26:42 +0000 (18:26 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 5 Jan 2008 18:26:42 +0000 (18:26 +0000)
gram.y

diff --git a/gram.y b/gram.y
index 706e1a6610f5f61ab379499cd123bf0b89be8672..1e7c2dd42cbacd9883b3b7ec9359b756f8f30328 100644 (file)
--- a/gram.y
+++ b/gram.y
@@ -671,7 +671,7 @@ init_parser(path, quiet)
     init_aliases();
 
     efree(sudoers);
-    sudoers = estrdup(path);
+    sudoers = path ? estrdup(path) : NULL;
 
     parse_error = FALSE;
     errorlineno = -1;