From fa5e0a238c999cbea5d57363db2cd0cbf9fffb86 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 22 Feb 2007 21:59:54 +0000 Subject: r21508: Fix memleak in new idmap_tdb, thanks Herb. Jerry please check. Simo. (This used to be commit a5354aa9a0bd860500356f45d09fce3d01649c60) --- source3/nsswitch/idmap_tdb.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'source3/nsswitch/idmap_tdb.c') diff --git a/source3/nsswitch/idmap_tdb.c b/source3/nsswitch/idmap_tdb.c index ef004daa3e..c21c066fea 100644 --- a/source3/nsswitch/idmap_tdb.c +++ b/source3/nsswitch/idmap_tdb.c @@ -1049,19 +1049,11 @@ static NTSTATUS idmap_tdb_remove_mapping(struct idmap_domain *dom, const struct /* Delete previous mappings. */ - data = tdb_fetch(ctx->tdb, ksid); - if (data.dptr) { - DEBUG(10, ("Deleting existing mapping %s -> %s\n", ksid.dptr, kid.dptr )); - tdb_delete(ctx->tdb, ksid); - SAFE_FREE(data.dptr); - } + DEBUG(10, ("Deleting existing mapping %s -> %s\n", ksid.dptr, kid.dptr )); + tdb_delete(ctx->tdb, ksid); - data = tdb_fetch(ctx->tdb, kid); - if (data.dptr) { - DEBUG(10,("Deleting existing mapping %s -> %s\n", kid.dptr, ksid.dptr )); - tdb_delete(ctx->tdb, kid); - SAFE_FREE(data.dptr); - } + DEBUG(10,("Deleting existing mapping %s -> %s\n", kid.dptr, ksid.dptr )); + tdb_delete(ctx->tdb, kid); tdb_chainunlock(ctx->tdb, ksid); ret = NT_STATUS_OK; -- cgit