1
0
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:
Andrew Tridgell
2005-01-06 03:06:58 +00:00
committed by Gerald (Jerry) Carter
parent 9eeb976773
commit 89b74b5354
41 changed files with 83 additions and 80 deletions

View File

@@ -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;
}