summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-03-01 05:52:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:18 -0500
commit377bb741014d37043b43df6f2414949cb319f85a (patch)
tree707a745f6c688d655b42d046beff9ff0e73ed913 /source3
parent1983759266c82abf79385342af68ad3413dbac29 (diff)
downloadsamba-377bb741014d37043b43df6f2414949cb319f85a.tar.gz
samba-377bb741014d37043b43df6f2414949cb319f85a.tar.bz2
samba-377bb741014d37043b43df6f2414949cb319f85a.zip
r21626: Fix memory leak on error path noticed by
SATOH Fumiyasu <fumiya@samba.gr.jp> (This used to be commit d68b2910c8ba97a42b8bccc0af1341fc301a76d0)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_cred_cache.c1
1 files changed, 1 insertions, 0 deletions
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);
}