diff options
author | Har Gagan Sahai <SHarGagan@novell.com> | 2015-09-10 16:04:27 +0530 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-09-11 06:39:19 +0200 |
commit | 12153af85d34e4ced5eab76753f2e4cafba0156c (patch) | |
tree | 75087190d42e77dcb94b1c2c83bda8511018072a /source3/libsmb/clidfs.c | |
parent | b0f41c07ffe8600433c20a038b1612c04ed29e89 (diff) | |
download | samba-12153af85d34e4ced5eab76753f2e4cafba0156c.tar.gz |
s3: dfs: Fix a crash when the dfs targets are disabled.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11509
Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@wakeful.net>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 11 06:39:19 CEST 2015 on sn-devel-104
Diffstat (limited to 'source3/libsmb/clidfs.c')
-rw-r--r-- | source3/libsmb/clidfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index bd587bc62b6..2121ad09f34 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -958,11 +958,11 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, status = cli_dfs_get_referral(ctx, cli_ipc, dfs_path, &refs, &num_refs, &consumed); - if (!NT_STATUS_IS_OK(status) || !num_refs) { + if (!NT_STATUS_IS_OK(status)) { return status; } - if (!refs[0].dfspath) { + if (!num_refs || !refs[0].dfspath) { return NT_STATUS_NOT_FOUND; } |