]> granicus.if.org Git - sudo/commitdiff
Avoid calling fclose(NULL) in the error path when we cannot open an
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 18 Sep 2012 14:02:13 +0000 (10:02 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 18 Sep 2012 14:02:13 +0000 (10:02 -0400)
I/O log file.

--HG--
branch : 1.7

sudoreplay.c

index 1e16a82221df1c4adb1c4b1a4e60df79e4d0c22e..153ab11b67085c6d7cffd6f7a5b6b459d8ec8040 100644 (file)
@@ -867,7 +867,8 @@ parse_logfile(logfile)
     return li;
 
 bad:
-    fclose(fp);
+    if (fp != NULL)
+       fclose(fp);
     efree(buf);
     free_log_info(li);
     return NULL;