From cc59bbfdea6f30b8dc8f1fc14353d15f02816aa3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 21 Jun 2003 14:28:18 +0000 Subject: Fix memory leak. secrets_fetch allocates memory. Volker (This used to be commit 2ec8d1ff88d3984a317a4a53ca3a299e8a68a9d7) --- source3/passdb/secrets.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') 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(); } -- cgit