summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-08-08 13:12:39 +0000
committerNoel Power <npower@samba.org>2019-09-25 09:47:32 +0000
commit40ddcf7bdcec547acdba090f43651cc5b953aded (patch)
tree1470228399757804dc6dd5e6fe6f928248b0041d /source3/libads
parentd3371d8545bb4303e866e991453a0bbb05dd7656 (diff)
downloadsamba-40ddcf7bdcec547acdba090f43651cc5b953aded.tar.gz
s3/libads: clang: Fix Array access results in a null pointer dereference
Fixes: source3/libads/cldap.c:400:6: warning: Array access (from variable 'responses') results in a null pointer dereference <--[clang] if (responses[0] == NULL) { ^ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/cldap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c
index f4022a19905..c44201ab8b5 100644
--- a/source3/libads/cldap.c
+++ b/source3/libads/cldap.c
@@ -397,7 +397,7 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
"failed: %s\n", nt_errstr(status)));
return false;
}
- if (responses[0] == NULL) {
+ if (responses == NULL || responses[0] == NULL) {
DEBUG(2, ("ads_cldap_netlogon: did not get a reply\n"));
TALLOC_FREE(responses);
return false;