summaryrefslogtreecommitdiffstats
path: root/src/util
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:14:16 +0100
commita8c4867d220d64bb132088f3fcfd7e8778a94ebe (patch)
treed442afd0d5dc0f1b2502de7d246571aa327524a0 /src/util
parentd1993f1ba87e41d59e1c9e0f1d16400d5c8d2f22 (diff)
downloadsssd-a8c4867d220d64bb132088f3fcfd7e8778a94ebe.tar.gz
sssd-a8c4867d220d64bb132088f3fcfd7e8778a94ebe.tar.xz
sssd-a8c4867d220d64bb132088f3fcfd7e8778a94ebe.zip
Free resources if fileno failed
Diffstat (limited to 'src/util')
-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;
}