From: Volker Lendecke Date: Wed, 2 Jul 2008 10:22:15 +0000 (+0200) Subject: Fix two memory leaks in an error path in idmap.c X-Git-Tag: samba-3.3.0pre1~706 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7cec389e19323e99b6b6258e539be9d1fd65810f;p=thirdparty%2Fsamba.git Fix two memory leaks in an error path in idmap.c --- diff --git a/source/winbindd/idmap.c b/source/winbindd/idmap.c index 8b16f27f7da..c0565964702 100644 --- a/source/winbindd/idmap.c +++ b/source/winbindd/idmap.c @@ -154,6 +154,7 @@ NTSTATUS smb_register_idmap(int version, const char *name, entry->name = talloc_strdup(idmap_ctx, name); if ( ! entry->name) { DEBUG(0,("Out of memory!\n")); + TALLOC_FREE(entry); return NT_STATUS_NO_MEMORY; } entry->methods = methods; @@ -207,6 +208,7 @@ NTSTATUS smb_register_idmap_alloc(int version, const char *name, entry->name = talloc_strdup(idmap_ctx, name); if ( ! entry->name) { DEBUG(0,("Out of memory!\n")); + TALLOC_FREE(entry); return NT_STATUS_NO_MEMORY; } entry->methods = methods;