mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
uwrap: Log error if we are out of memory.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
0a3d142484
commit
41d7b64744
@ -490,12 +490,14 @@ static int uwrap_new_id(pthread_t tid, bool do_alloc)
|
||||
if (do_alloc) {
|
||||
id = malloc(sizeof(struct uwrap_thread));
|
||||
if (id == NULL) {
|
||||
UWRAP_LOG(UWRAP_LOG_ERROR, "Unable to allocate memory");
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
id->groups = malloc(sizeof(gid_t) * 1);
|
||||
if (id->groups == NULL) {
|
||||
UWRAP_LOG(UWRAP_LOG_ERROR, "Unable to allocate memory");
|
||||
SAFE_FREE(id);
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user