]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_client: Use common "goto fail" for all error cases
authorVolker Lendecke <vl@samba.org>
Sun, 10 Jan 2021 17:31:33 +0000 (18:31 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 12 Jan 2021 00:10:30 +0000 (00:10 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/cli_pipe.c

index c14e95ac87e67b8b86018f70fb7f1e2d8170aabf..040bd7cda90faf3a2c1f3dfca881706c73eda8fe 100644 (file)
@@ -2980,8 +2980,8 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
 
        result->binding_handle = rpccli_bh_create(result, NULL, table);
        if (result->binding_handle == NULL) {
-               TALLOC_FREE(result);
-               return NT_STATUS_NO_MEMORY;
+               status = NT_STATUS_NO_MEMORY;
+               goto fail;
        }
 
        *presult = result;