From 3831f866292da4118e87e204ac8c02244825bf43 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 18 Dec 2012 19:33:57 +0100 Subject: Free resources if fileno failed --- src/util/debug.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util/debug.c') 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; } -- cgit