summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-06-21 14:28:18 +0000
committerVolker Lendecke <vlendec@samba.org>2003-06-21 14:28:18 +0000
commitcc59bbfdea6f30b8dc8f1fc14353d15f02816aa3 (patch)
treef47f940b0911f8de269790838ad5df547728f2b7
parent668a9af94eebd7cc875a1f0c7d9fbcb135fb5c61 (diff)
downloadsamba-cc59bbfdea6f30b8dc8f1fc14353d15f02816aa3.tar.gz
samba-cc59bbfdea6f30b8dc8f1fc14353d15f02816aa3.tar.bz2
samba-cc59bbfdea6f30b8dc8f1fc14353d15f02816aa3.zip
Fix memory leak. secrets_fetch allocates memory.
Volker (This used to be commit 2ec8d1ff88d3984a317a4a53ca3a299e8a68a9d7)
-rw-r--r--source3/passdb/secrets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index bd4f559f9f..7b127fd152 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -453,6 +453,7 @@ char *secrets_fetch_machine_password(const char *domain,
last_set_time = secrets_fetch(key, &size);
if (last_set_time) {
*pass_last_set_time = IVAL(last_set_time,0);
+ SAFE_FREE(last_set_time);
} else {
*pass_last_set_time = 0;
}
@@ -467,6 +468,7 @@ char *secrets_fetch_machine_password(const char *domain,
channel_type = secrets_fetch(key, &size);
if (channel_type) {
*channel = IVAL(channel_type,0);
+ SAFE_FREE(channel_type);
} else {
*channel = get_default_sec_channel();
}