]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Fix an uninitialized variable read
authorVolker Lendecke <vl@samba.org>
Thu, 11 Feb 2021 07:03:38 +0000 (08:03 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 9 Mar 2021 22:36:28 +0000 (22:36 +0000)
If cli_rpc_pipe_open_noauth() fails, we end up in TALLOC_FREE() of
"p", which is uninitialized.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/util_sd.c

index bcf152b22cf341f1da44176c04d53473973f91d2..d90d566cdb208f5acaed452875ab8f86249b26da 100644 (file)
@@ -175,7 +175,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
                                    struct dom_sid *sid)
 {
        struct smbXcli_tcon *orig_tcon = NULL;
-       struct rpc_pipe_client *p;
+       struct rpc_pipe_client *p = NULL;
        struct policy_handle handle;
        NTSTATUS status;
        TALLOC_CTX *frame = talloc_stackframe();