From 3fa03d5816d6a401d8e894b77236d3cfd95dbd96 Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Oct 02 2015 10:50:37 +0000 Subject: SDAP: fix minor memory leak Reviewed-by: Pavel Březina --- diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 653187b..6096683 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 dd959b2..36d5298 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; }