summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/debug.c b/src/util/debug.c
index a027e701b..05b560c4f 100644
--- a/src/util/debug.c
+++ b/src/util/debug.c
@@ -209,6 +209,8 @@ int open_debug_file_ex(const char *filename, FILE **filep)
debug_fd = fileno(f);
if (debug_fd == -1) {
+ fclose(f);
+ free(logpath);
return EIO;
}