|
|
3203b4 |
From 58e3bfad6a6fc5d44c928b37e79bc36775aee2a8 Mon Sep 17 00:00:00 2001
|
|
|
3203b4 |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
3203b4 |
Date: Fri, 8 Apr 2016 11:47:44 +0200
|
|
|
3203b4 |
Subject: [PATCH 111/111] memberof: Don't allocate on NULL when deleting
|
|
|
3203b4 |
memberUids
|
|
|
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 27a0be2bb6f21f66527e0edea4ed2cb4b5cafa53)
|
|
|
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 118e95a4d3b6246f2c7775f300ac345ac63ff17a..6c0180a493ce0c013b5882100a85b453e4111e63 100644
|
|
|
3203b4 |
--- a/src/ldb_modules/memberof.c
|
|
|
3203b4 |
+++ b/src/ldb_modules/memberof.c
|
|
|
3203b4 |
@@ -2471,7 +2471,7 @@ static int mbof_del_fill_muop(struct mbof_del_ctx *del_ctx,
|
|
|
3203b4 |
for (i = 0; i < el->num_values; i++) {
|
|
|
3203b4 |
struct ldb_dn *valdn;
|
|
|
3203b4 |
|
|
|
3203b4 |
- valdn = ldb_dn_from_ldb_val(del_ctx->muops,
|
|
|
3203b4 |
+ valdn = ldb_dn_from_ldb_val(del_ctx,
|
|
|
3203b4 |
ldb_module_get_ctx(del_ctx->ctx->module),
|
|
|
3203b4 |
&el->values[i]);
|
|
|
3203b4 |
if (!valdn || !ldb_dn_validate(valdn)) {
|
|
|
3203b4 |
@@ -2489,6 +2489,7 @@ static int mbof_del_fill_muop(struct mbof_del_ctx *del_ctx,
|
|
|
3203b4 |
if (ret != LDB_SUCCESS) {
|
|
|
3203b4 |
return ret;
|
|
|
3203b4 |
}
|
|
|
3203b4 |
+ talloc_steal(del_ctx->muops, valdn);
|
|
|
3203b4 |
}
|
|
|
3203b4 |
|
|
|
3203b4 |
return LDB_SUCCESS;
|
|
|
3203b4 |
--
|
|
|
3203b4 |
2.4.11
|
|
|
3203b4 |
|