mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
r21698: Check for talloc failures.
Andrew Bartlett (This used to be commit c9eb5bf19a702af32a4e4f109a27e4076303efdc)
This commit is contained in:
parent
099a3a7f52
commit
c069ead0bb
@ -58,6 +58,9 @@ static NTSTATUS dcesrv_echo_SourceData(struct dcesrv_call_state *dce_call, TALLO
|
||||
int i;
|
||||
|
||||
r->out.data = talloc_array(mem_ctx, uint8_t, r->in.len);
|
||||
if (!r->out.data) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
for (i=0;i<r->in.len;i++) {
|
||||
r->out.data[i] = i;
|
||||
@ -126,6 +129,9 @@ static NTSTATUS dcesrv_echo_TestSurrounding(struct dcesrv_call_state *dce_call,
|
||||
}
|
||||
|
||||
r->out.data = talloc(mem_ctx, struct echo_Surrounding);
|
||||
if (!r->out.data) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
r->out.data->x = 2 * r->in.data->x;
|
||||
r->out.data->surrounding = talloc_zero_array(mem_ctx, uint16_t, r->out.data->x);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user