summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-12-18 19:33:57 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-20 18:12:18 +0100
commit3831f866292da4118e87e204ac8c02244825bf43 (patch)
tree314962554c8f6a20dab43bd4b9ff5fa71c45b742
parent767a679fd5ac2f409476180c0dbcd8ecbe991503 (diff)
downloadsssd-3831f866292da4118e87e204ac8c02244825bf43.tar.gz
sssd-3831f866292da4118e87e204ac8c02244825bf43.tar.xz
sssd-3831f866292da4118e87e204ac8c02244825bf43.zip
Free resources if fileno failed
-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;
}