|
|
3203b4 |
From 54aa951a69cb0d0d4f2b154bff520145ecd659cf Mon Sep 17 00:00:00 2001
|
|
|
3203b4 |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
3203b4 |
Date: Wed, 6 Apr 2016 18:35:39 +0200
|
|
|
3203b4 |
Subject: [PATCH 110/111] memberof: Fix a memory leak when removing ghost users
|
|
|
3203b4 |
MIME-Version: 1.0
|
|
|
3203b4 |
Content-Type: text/plain; charset=UTF-8
|
|
|
3203b4 |
Content-Transfer-Encoding: 8bit
|
|
|
3203b4 |
|
|
|
3203b4 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
3203b4 |
(cherry picked from commit c07fb3f111b4dc2780fa4e1408ea04cd36e95a4d)
|
|
|
3203b4 |
---
|
|
|
3203b4 |
src/ldb_modules/memberof.c | 3 ++-
|
|
|
3203b4 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
3203b4 |
|
|
|
3203b4 |
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
|
|
|
3203b4 |
index be7c07dbcda257b6d813bb232ec27973167c25c4..118e95a4d3b6246f2c7775f300ac345ac63ff17a 100644
|
|
|
3203b4 |
--- a/src/ldb_modules/memberof.c
|
|
|
3203b4 |
+++ b/src/ldb_modules/memberof.c
|
|
|
3203b4 |
@@ -2531,7 +2531,7 @@ static int mbof_del_fill_ghop_ex(struct mbof_del_ctx *del_ctx,
|
|
|
3203b4 |
num_gh_vals, mbof->num_values);
|
|
|
3203b4 |
|
|
|
3203b4 |
for (i = 0; i < mbof->num_values; i++) {
|
|
|
3203b4 |
- valdn = ldb_dn_from_ldb_val(del_ctx->ghops,
|
|
|
3203b4 |
+ valdn = ldb_dn_from_ldb_val(del_ctx,
|
|
|
3203b4 |
ldb_module_get_ctx(del_ctx->ctx->module),
|
|
|
3203b4 |
&mbof->values[i]);
|
|
|
3203b4 |
if (!valdn || !ldb_dn_validate(valdn)) {
|
|
|
3203b4 |
@@ -2556,6 +2556,7 @@ static int mbof_del_fill_ghop_ex(struct mbof_del_ctx *del_ctx,
|
|
|
3203b4 |
if (ret != LDB_SUCCESS) {
|
|
|
3203b4 |
return ret;
|
|
|
3203b4 |
}
|
|
|
3203b4 |
+ talloc_steal(del_ctx->ghops, valdn);
|
|
|
3203b4 |
}
|
|
|
3203b4 |
}
|
|
|
3203b4 |
|
|
|
3203b4 |
--
|
|
|
3203b4 |
2.4.11
|
|
|
3203b4 |
|