r24780: More work allowing libutil to be used by external users.
[kai/samba.git] / source4 / libcli / smb2 / create.c
index 58e7a905d97ea0f0a3e89f8eeebd3c4b65a1515c..c8ac271f4496773430563ee533c7480240f1c673 100644 (file)
@@ -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);