mirror of
https://github.com/samba-team/samba.git
synced 2025-11-22 16:23:49 +03:00
r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate. also fixed a memory leak in pvfs_copy_file() (failed to free a memory context)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
9eeb976773
commit
89b74b5354
@@ -37,11 +37,10 @@ static NTSTATUS echo_EchoData(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
r->out.out_data = talloc(mem_ctx, r->in.len);
|
||||
r->out.out_data = talloc_memdup(mem_ctx, r->in.in_data, r->in.len);
|
||||
if (!r->out.out_data) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
memcpy(r->out.out_data, r->in.in_data, r->in.len);
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user