Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Found by Coverity.
return status;
}
+ buffer = talloc_array(mem_ctx, uint8_t, bytes_needed);
+ if (buffer == NULL) {
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+
status = dcerpc_eventlog_GetLogInformation(b, mem_ctx,
&handle,
0, /* level */
}
buf_size = bytes_needed;
- buffer = talloc_array(mem_ctx, uint8_t, bytes_needed);
- if (!buffer) {
+ buffer = talloc_realloc(mem_ctx, buffer, uint8_t, bytes_needed);
+ if (buffer == NULL) {
status = NT_STATUS_NO_MEMORY;
goto done;
}