From 377bb741014d37043b43df6f2414949cb319f85a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 1 Mar 2007 05:52:38 +0000 Subject: r21626: Fix memory leak on error path noticed by SATOH Fumiyasu (This used to be commit d68b2910c8ba97a42b8bccc0af1341fc301a76d0) --- source3/nsswitch/winbindd_cred_cache.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/nsswitch/winbindd_cred_cache.c') diff --git a/source3/nsswitch/winbindd_cred_cache.c b/source3/nsswitch/winbindd_cred_cache.c index d0904002dd..f161587e7a 100644 --- a/source3/nsswitch/winbindd_cred_cache.c +++ b/source3/nsswitch/winbindd_cred_cache.c @@ -517,6 +517,7 @@ static NTSTATUS store_memory_creds(struct WINBINDD_MEMORY_CREDS *memcredp, const if ((mlock(memcredp->nt_hash, memcredp->len)) == -1) { DEBUG(0,("failed to mlock memory: %s (%d)\n", strerror(errno), errno)); + SAFE_FREE(memcredp->nt_hash); return map_nt_error_from_unix(errno); } -- cgit