From 3fa03d5816d6a401d8e894b77236d3cfd95dbd96 Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Fri, 4 Sep 2015 07:04:10 -0400 Subject: SDAP: fix minor memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Pavel Březina --- src/providers/ldap/sdap_async_groups.c | 2 +- src/providers/ldap/sdap_idmap.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/providers/ldap') diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 653187b3a..609668339 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -592,7 +592,7 @@ static int sdap_save_group(TALLOC_CTX *memctx, if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Error: Failed to mark group as non-posix!\n"); - return ret; + goto done; } } diff --git a/src/providers/ldap/sdap_idmap.c b/src/providers/ldap/sdap_idmap.c index dd959b2c1..36d529836 100644 --- a/src/providers/ldap/sdap_idmap.c +++ b/src/providers/ldap/sdap_idmap.c @@ -206,7 +206,8 @@ sdap_idmap_init(TALLOC_CTX *mem_ctx, if (err != IDMAP_SUCCESS) { /* This should never happen */ DEBUG(SSSDBG_CRIT_FAILURE, "sss_idmap_ctx corrupted\n"); - return EIO; + ret = EIO; + goto done; } -- cgit