summaryrefslogtreecommitdiff
path: root/src/util/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/debug.c')
-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 f107f168..54fb8011 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;
}