diff options
author | Noel Power <noel.power@suse.com> | 2016-04-18 13:02:59 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-04-25 10:35:15 +0200 |
commit | 03302bcb8649aade7d9ed7e011710e4430f542ae (patch) | |
tree | 513f2bee34ebadf2f65c84ac7efd7f6ce454c7c9 /source4 | |
parent | c20fb11665e1e90269d6a9a1589652d568f6ac2a (diff) | |
download | samba-03302bcb8649aade7d9ed7e011710e4430f542ae.tar.gz |
s4:libcli: fix 'Conditional jump or move' valgrind error
smbtorture test base.tcondev.tcondev causes the following valgrind trace
==23282== Conditional jump or move depends on uninitialised value(s)
==23282== at 0x9BE5632: smbcli_tconX (cliconnect.c:148)
==23282== by 0x41021C: tcon_devtest (base.c:91)
==23282== by 0x411A01: run_tcon_devtype_test (base.c:522)
==23282== by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856)
==23282== by 0x955368F: internal_torture_run_test (torture.c:442)
==23282== by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==23282== by 0x2600A4: run_matching (smbtorture.c:110)
==23282== by 0x25FF66: run_matching (smbtorture.c:95)
==23282== by 0x2601C5: torture_run_named_tests (smbtorture.c:143)
==23282== by 0x261E44: main (smbtorture.c:665)
==23282==
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/cliconnect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c index 35d963eebf8..58118b086aa 100644 --- a/source4/libcli/cliconnect.c +++ b/source4/libcli/cliconnect.c @@ -142,13 +142,16 @@ NTSTATUS smbcli_tconX(struct smbcli_state *cli, const char *sharename, tcon.tconx.in.device = devtype; status = smb_raw_tcon(cli->tree, mem_ctx, &tcon); - + if (!NT_STATUS_IS_OK(status)) { + goto out; + } cli->tree->tid = tcon.tconx.out.tid; if (tcon.tconx.out.options & SMB_EXTENDED_SIGNATURES) { smb1cli_session_protect_session_key(cli->tree->session->smbXcli); } +out: talloc_free(mem_ctx); return status; |