summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-03 09:42:40 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-03 13:26:41 +0200
commit141255402340299c4ae544f546a979f2872a091a (patch)
tree1d9290e04d9129722d379d0862e7927624c6d27b /src/util
parent04689cbf9c09d68ed5640919757d4bef292a9c57 (diff)
downloadsssd-141255402340299c4ae544f546a979f2872a091a.tar.gz
sssd-141255402340299c4ae544f546a979f2872a091a.tar.xz
sssd-141255402340299c4ae544f546a979f2872a091a.zip
pidfile(): Do not leak fd on error
https://fedorahosted.org/sssd/ticket/1860
Diffstat (limited to 'src/util')
-rw-r--r--src/util/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/server.c b/src/util/server.c
index b3073fcd1..beba57b29 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -221,6 +221,7 @@ int pidfile(const char *path, const char *name)
err = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
("write failed [%d][%s]\n", err, strerror(err)));
+ close(fd);
return err;
}