summaryrefslogtreecommitdiffstats
path: root/src/ldb_modules
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-04-06 18:35:39 +0200
committerLukas Slebodnik <lslebodn@redhat.com>2016-04-13 15:44:19 +0200
commitc07fb3f111b4dc2780fa4e1408ea04cd36e95a4d (patch)
tree733b983f70eb256d5f8e54eb1876147f2d3d50fa /src/ldb_modules
parentf818dba78f3e2f3d53ba072e42ac662d2f49edad (diff)
downloadsssd-c07fb3f111b4dc2780fa4e1408ea04cd36e95a4d.tar.gz
sssd-c07fb3f111b4dc2780fa4e1408ea04cd36e95a4d.tar.xz
sssd-c07fb3f111b4dc2780fa4e1408ea04cd36e95a4d.zip
memberof: Fix a memory leak when removing ghost users
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/ldb_modules')
-rw-r--r--src/ldb_modules/memberof.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index 54e4b3ee2..0d909bfe8 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -2531,7 +2531,7 @@ static int mbof_del_fill_ghop_ex(struct mbof_del_ctx *del_ctx,
num_gh_vals, mbof->num_values);
for (i = 0; i < mbof->num_values; i++) {
- valdn = ldb_dn_from_ldb_val(del_ctx->ghops,
+ valdn = ldb_dn_from_ldb_val(del_ctx,
ldb_module_get_ctx(del_ctx->ctx->module),
&mbof->values[i]);
if (!valdn || !ldb_dn_validate(valdn)) {
@@ -2556,6 +2556,7 @@ static int mbof_del_fill_ghop_ex(struct mbof_del_ctx *del_ctx,
if (ret != LDB_SUCCESS) {
return ret;
}
+ talloc_steal(del_ctx->ghops, valdn);
}
}