summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/create.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c
index 58e7a905d9..c8ac271f44 100644
--- a/source4/libcli/smb2/create.c
+++ b/source4/libcli/smb2/create.c
@@ -34,11 +34,10 @@ NTSTATUS smb2_create_blob_add(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
uint32_t tag,
DATA_BLOB add, BOOL last)
{
- NTSTATUS status;
uint32_t ofs = blob->length;
uint8_t pad = smb2_padding_size(add.length, 8);
- status = data_blob_realloc(mem_ctx, blob, blob->length + 0x18 + add.length + pad);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (!data_blob_realloc(mem_ctx, blob, blob->length + 0x18 + add.length + pad))
+ return NT_STATUS_NO_MEMORY;
if (last) {
SIVAL(blob->data, ofs+0x00, 0);