mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
Fix two memory leaks in an error path in idmap.c
(This used to be commit 7cec389e19323e99b6b6258e539be9d1fd65810f)
This commit is contained in:
parent
065760ede0
commit
ab57861686
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user