mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Fix for previous checkin. Only use talloc on unmarshalling or we'll
leak memory.
Jeremy.
(This used to be commit 07a76eb2e0
)
This commit is contained in:
@ -4619,10 +4619,12 @@ BOOL samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
|
|||||||
if(!prs_uint32("num_sids1", ps, depth, &r_u->num_sids1))
|
if(!prs_uint32("num_sids1", ps, depth, &r_u->num_sids1))
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
|
if (UNMARSHALLING(ps)) {
|
||||||
ptr_sid = talloc(ps->mem_ctx, sizeof(uint32) * r_u->num_sids1);
|
ptr_sid = talloc(ps->mem_ctx, sizeof(uint32) * r_u->num_sids1);
|
||||||
if (!ptr_sid) {
|
if (!ptr_sid) {
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < r_u->num_sids1; i++) {
|
for (i = 0; i < r_u->num_sids1; i++) {
|
||||||
ptr_sid[i] = 1;
|
ptr_sid[i] = 1;
|
||||||
|
Reference in New Issue
Block a user