summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-07-01 13:04:50 +0000
committerVolker Lendecke <vlendec@samba.org>2003-07-01 13:04:50 +0000
commitf13e48e2ee205036983fb5c2abe28b4bfaa31856 (patch)
tree294f10ca2fd8ef2446322cc200c3c542fd4daddb
parentb78dd91e68d6273d1fcd3470b1c3c333047fb186 (diff)
downloadsamba-f13e48e2ee205036983fb5c2abe28b4bfaa31856.tar.gz
samba-f13e48e2ee205036983fb5c2abe28b4bfaa31856.tar.bz2
samba-f13e48e2ee205036983fb5c2abe28b4bfaa31856.zip
Different fix for memleak just committed. This belongs into
tdb_search_list_free. Volker (This used to be commit 0f3822c8e71426983b960ad49511efa8707159f9)
-rw-r--r--source3/lib/gencache.c2
-rw-r--r--source3/passdb/secrets.c2
-rw-r--r--source3/tdb/tdbutil.c1
3 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index b94e35eff4..f3740e3e12 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -329,7 +329,6 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time
if (!databuf.dptr || databuf.dsize <= TIMEOUT_LEN) {
SAFE_FREE(databuf.dptr);
SAFE_FREE(keystr);
- SAFE_FREE(node->node_key.dptr);
node = node->next;
continue;
}
@@ -345,7 +344,6 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time
SAFE_FREE(valstr);
SAFE_FREE(entry);
SAFE_FREE(keystr);
- SAFE_FREE(node->node_key.dptr);
node = node->next;
}
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 57a539b092..c039fe53b4 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -616,8 +616,6 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, unsigned in
return NT_STATUS_NO_MEMORY;
}
- SAFE_FREE(k->node_key.dptr);
-
packed_pass = secrets_fetch(secrets_key, &size);
packed_size = tdb_trusted_dom_pass_unpack(packed_pass, size, pass);
/* packed representation isn't needed anymore */
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 19dfe642df..595062dc87 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -821,6 +821,7 @@ void tdb_search_list_free(TDB_LIST_NODE* node)
while (node) {
next_node = node->next;
+ SAFE_FREE(node->node_key.dptr);
SAFE_FREE(node);
node = next_node;
};