diff options
author | Andreas Schneider <asn@samba.org> | 2014-07-31 10:12:15 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-07-31 18:49:47 +0200 |
commit | b7f9d3b49160538d9d77723e80307cdfb2d071d0 (patch) | |
tree | c1caa165961a4b656e78278e139b5498c2dc6622 /lib | |
parent | e249e794ecff42acfea264ecdd01af5bb661b503 (diff) | |
download | samba-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.c | 1 |
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; } |