|
|
6cf099 |
From 69bf6ed59e73e92a52c080b4af57f554f703ab52 Mon Sep 17 00:00:00 2001
|
|
|
6cf099 |
From: Pavel Reichl <preichl@redhat.com>
|
|
|
6cf099 |
Date: Thu, 3 Sep 2015 04:46:50 -0400
|
|
|
6cf099 |
Subject: [PATCH 69/73] GPO: fix memory leak
|
|
|
6cf099 |
MIME-Version: 1.0
|
|
|
6cf099 |
Content-Type: text/plain; charset=UTF-8
|
|
|
6cf099 |
Content-Transfer-Encoding: 8bit
|
|
|
6cf099 |
|
|
|
6cf099 |
Resolves:
|
|
|
6cf099 |
https://fedorahosted.org/sssd/ticket/2777
|
|
|
6cf099 |
|
|
|
6cf099 |
Reviewed-by: Michal Židek <mzidek@redhat.com>
|
|
|
6cf099 |
---
|
|
|
6cf099 |
src/providers/ad/ad_gpo.c | 6 +++---
|
|
|
6cf099 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6cf099 |
|
|
|
6cf099 |
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
|
|
|
6cf099 |
index 974fd04b99709055f25ed2a3b77821b3caec09ad..a7ba4b2210115a19a3e4430744d36fe76da20f09 100644
|
|
|
6cf099 |
--- a/src/providers/ad/ad_gpo.c
|
|
|
6cf099 |
+++ b/src/providers/ad/ad_gpo.c
|
|
|
6cf099 |
@@ -560,14 +560,14 @@ ad_gpo_get_sids(TALLOC_CTX *mem_ctx,
|
|
|
6cf099 |
DEBUG(SSSDBG_OP_FAILURE,
|
|
|
6cf099 |
"sysdb_initgroups failed: [%d](%s)\n",
|
|
|
6cf099 |
ret, sss_strerror(ret));
|
|
|
6cf099 |
- return ret;
|
|
|
6cf099 |
+ goto done;
|
|
|
6cf099 |
}
|
|
|
6cf099 |
|
|
|
6cf099 |
if (res->count == 0) {
|
|
|
6cf099 |
ret = ENOENT;
|
|
|
6cf099 |
DEBUG(SSSDBG_OP_FAILURE,
|
|
|
6cf099 |
"sysdb_initgroups returned empty result\n");
|
|
|
6cf099 |
- return ret;
|
|
|
6cf099 |
+ goto done;
|
|
|
6cf099 |
}
|
|
|
6cf099 |
|
|
|
6cf099 |
user_sid = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_SID_STR, NULL);
|
|
|
6cf099 |
@@ -602,7 +602,7 @@ ad_gpo_get_sids(TALLOC_CTX *mem_ctx,
|
|
|
6cf099 |
*_group_size = num_group_sids + 1;
|
|
|
6cf099 |
*_group_sids = talloc_steal(mem_ctx, group_sids);
|
|
|
6cf099 |
*_user_sid = talloc_steal(mem_ctx, user_sid);
|
|
|
6cf099 |
- return EOK;
|
|
|
6cf099 |
+ ret = EOK;
|
|
|
6cf099 |
|
|
|
6cf099 |
done:
|
|
|
6cf099 |
talloc_free(tmp_ctx);
|
|
|
6cf099 |
--
|
|
|
6cf099 |
2.4.3
|
|
|
6cf099 |
|