From 7dae7d3fb4bd0c36c05923056f94049d3380bb3a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 17 Jun 2003 10:16:20 +0000 Subject: Fix memory leak in idmap. Valgrind is soooo cool. Volker (This used to be commit dcdb6683a7c9d675c23cc2c0295cefec81f469a7) --- source3/sam/idmap_tdb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/sam') diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c index ecef98d380..cb595c4578 100644 --- a/source3/sam/idmap_tdb.c +++ b/source3/sam/idmap_tdb.c @@ -309,11 +309,13 @@ static NTSTATUS db_set_mapping(const DOM_SID *sid, unid_t id, int id_type) if (data.dptr) { tdb_delete(idmap_tdb, data); tdb_delete(idmap_tdb, ksid); + SAFE_FREE(data.dptr); } data = tdb_fetch(idmap_tdb, kid); if (data.dptr) { tdb_delete(idmap_tdb, data); tdb_delete(idmap_tdb, kid); + SAFE_FREE(data.dptr); } if (tdb_store(idmap_tdb, ksid, kid, TDB_INSERT) == -1) { -- cgit