summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-04-30 17:51:36 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-05-06 11:55:00 +0200
commit09f6afae29a2e80655496f7f71a72e50424e6f1c (patch)
tree357b0706db02fef9156f0230d94f5b4a4c3901f9
parent3c2a6219550488e33fd9d50c74ac30b325f6b99a (diff)
downloadsssd-09f6afae29a2e80655496f7f71a72e50424e6f1c.tar.gz
sssd-09f6afae29a2e80655496f7f71a72e50424e6f1c.tar.xz
sssd-09f6afae29a2e80655496f7f71a72e50424e6f1c.zip
IFP: Close memstream handle in introspect destructor
There was a resource leak in the introspection code. This patch fixes the leak. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
-rw-r--r--src/sbus/sssd_dbus_introspect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_introspect.c b/src/sbus/sssd_dbus_introspect.c
index c8e8c97a1..f310aeb74 100644
--- a/src/sbus/sssd_dbus_introspect.c
+++ b/src/sbus/sssd_dbus_introspect.c
@@ -58,6 +58,10 @@ struct introspect_ctx {
static int introspect_ctx_destructor(struct introspect_ctx *ictx)
{
+ if (ictx->f) {
+ fclose(ictx->f);
+ }
+
free(ictx->buf);
ictx->buf = NULL;
return 0;