r24780: More work allowing libutil to be used by external users.
[kai/samba.git] / source4 / librpc / rpc / dcerpc.c
index ed9eb7da78c67ec71b798cf4a29bf64103a2d0bd..984cc20fbc7dd80f4c4be34540854732959856d2 100644 (file)
@@ -429,10 +429,9 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
                        return status;
                }
                blob->length -= c->security_state.auth_info->credentials.length;
-               status = data_blob_append(mem_ctx, blob,
-                                         creds2.data, creds2.length);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
+               if (!data_blob_append(mem_ctx, blob,
+                                         creds2.data, creds2.length)) {
+                       return NT_STATUS_NO_MEMORY;
                }
                dcerpc_set_auth_length(blob, creds2.length);
                if (c->security_state.auth_info->credentials.length == 0) {
@@ -457,10 +456,9 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
                        return status;
                }
                blob->length -= c->security_state.auth_info->credentials.length;
-               status = data_blob_append(mem_ctx, blob,
-                                         creds2.data, creds2.length);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
+               if (!data_blob_append(mem_ctx, blob,
+                                         creds2.data, creds2.length)) {
+                       return NT_STATUS_NO_MEMORY;
                }
                dcerpc_set_auth_length(blob, creds2.length);
                if (c->security_state.auth_info->credentials.length == 0) {