diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-04-30 17:51:36 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-06 11:55:00 +0200 |
commit | 09f6afae29a2e80655496f7f71a72e50424e6f1c (patch) | |
tree | 357b0706db02fef9156f0230d94f5b4a4c3901f9 | |
parent | 3c2a6219550488e33fd9d50c74ac30b325f6b99a (diff) | |
download | sssd-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.c | 4 |
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; |