From: Andrej Gessel Date: Wed, 12 Apr 2017 13:12:49 +0000 (+0200) Subject: bugfix memory leak. partition_dn is only used to search and compare and is not freed... X-Git-Tag: talloc-2.1.12~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e6050587bc35601093ac9b71aae8fdbeddbcb73;p=thirdparty%2Fsamba.git bugfix memory leak. partition_dn is only used to search and compare and is not freed at the function end. Signed-off-by: Andrej Gessel Reviewed-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 2871a683b74..c4ef6086331 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -694,7 +694,7 @@ WERROR libnet_vampire_cb_store_chunk(void *private_data, } s->total_objects += object_count; - partition_dn = ldb_dn_new(s, s->ldb, c->partition->nc.dn); + partition_dn = ldb_dn_new(s_dsa, s->ldb, c->partition->nc.dn); if (partition_dn == NULL) { DEBUG(0,("Failed to parse partition DN from DRS.\n")); return WERR_INVALID_PARAMETER; @@ -710,7 +710,7 @@ WERROR libnet_vampire_cb_store_chunk(void *private_data, DEBUG(0,("Exop on[%s] objects[%u] linked_values[%u]\n", c->partition->nc.dn, s->total_objects, linked_attributes_count)); } - ret = dsdb_find_nc_root(s->ldb, s, + ret = dsdb_find_nc_root(s->ldb, s_dsa, partition_dn, &nc_root); if (ret != LDB_SUCCESS) { DEBUG(0,(__location__ ": Failed to find nc_root for %s\n",