summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-07-31 10:12:15 +0200
committerMichael Adam <obnox@samba.org>2014-07-31 18:49:47 +0200
commitb7f9d3b49160538d9d77723e80307cdfb2d071d0 (patch)
treec1caa165961a4b656e78278e139b5498c2dc6622 /lib
parente249e794ecff42acfea264ecdd01af5bb661b503 (diff)
downloadsamba-b7f9d3b49160538d9d77723e80307cdfb2d071d0.tar.gz
uwrap: Fix memory leak on error.
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/uid_wrapper/uid_wrapper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c
index cb99481993a..742903a11d7 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/lib/uid_wrapper/uid_wrapper.c
@@ -431,6 +431,7 @@ static int uwrap_new_id(pthread_t tid, bool do_alloc)
id->groups = malloc(sizeof(gid_t) * 1);
if (id->groups == NULL) {
+ SAFE_FREE(id);
errno = ENOMEM;
return -1;
}