diff options
-rw-r--r-- | source/lib/gencache.c | 2 | ||||
-rw-r--r-- | source/passdb/secrets.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c index f3740e3e127..b94e35eff4d 100644 --- a/source/lib/gencache.c +++ b/source/lib/gencache.c @@ -329,6 +329,7 @@ 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; } @@ -344,6 +345,7 @@ 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/source/passdb/secrets.c b/source/passdb/secrets.c index f91d59989f2..57a539b0929 100644 --- a/source/passdb/secrets.c +++ b/source/passdb/secrets.c @@ -615,6 +615,8 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, unsigned in DEBUG(0, ("strndup failed!\n")); 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); |