diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-06-17 10:16:20 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-06-17 10:16:20 +0000 |
commit | 7dae7d3fb4bd0c36c05923056f94049d3380bb3a (patch) | |
tree | 97dc3fb516af20d497236a0ff87290cac3fa1e0d | |
parent | ea1cec68bb598fa7a9c2ee493033817b5de7e3e1 (diff) | |
download | samba-7dae7d3fb4bd0c36c05923056f94049d3380bb3a.tar.gz samba-7dae7d3fb4bd0c36c05923056f94049d3380bb3a.tar.bz2 samba-7dae7d3fb4bd0c36c05923056f94049d3380bb3a.zip |
Fix memory leak in idmap. Valgrind is soooo cool.
Volker
(This used to be commit dcdb6683a7c9d675c23cc2c0295cefec81f469a7)
-rw-r--r-- | source3/sam/idmap_tdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |