diff options
-rw-r--r-- | src/util/debug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/debug.c b/src/util/debug.c index f107f168b..54fb8011b 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; } |