1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Don't leak data.dptr on error path.

Michael
(This used to be commit d14de0692c)
This commit is contained in:
Michael Adam 2008-01-08 21:51:07 +01:00
parent 3ff1fc3932
commit f168fac54c

View File

@ -394,6 +394,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
char *string_sid;
TDB_DATA dbuf;
const char *p;
NTSTATUS status;
TALLOC_CTX *frame;
slprintf(key, sizeof(key), "%s%s", MEMBEROF_PREFIX,
@ -414,14 +415,15 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
continue;
if (!add_sid_to_array_unique(NULL, &alias, sids, num)) {
TALLOC_FREE(frame);
return NT_STATUS_NO_MEMORY;
status = NT_STATUS_NO_MEMORY;
goto done;
}
}
done:
TALLOC_FREE(frame);
SAFE_FREE(dbuf.dptr);
return NT_STATUS_OK;
return status;
}
static NTSTATUS alias_memberships(const DOM_SID *members, size_t num_members,