summaryrefslogtreecommitdiff
path: root/source3/passdb/login_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/login_cache.c')
-rw-r--r--source3/passdb/login_cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index fc05122cca..0d782912b1 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -95,10 +95,13 @@ LOGIN_CACHE * login_cache_read(SAM_ACCOUNT *sampass)
&entry->bad_password_count,
&entry->bad_password_time) == -1) {
DEBUG(7, ("No cache entry found\n"));
+ SAFE_FREE(entry);
SAFE_FREE(databuf.dptr);
return NULL;
}
+ SAFE_FREE(databuf.dptr);
+
DEBUG(5, ("Found login cache entry: timestamp %12u, flags 0x%x, count %d, time %12u\n",
(unsigned int)entry->entry_timestamp, entry->acct_ctrl,
entry->bad_password_count, (unsigned int)entry->bad_password_time));