libads: Fix CID 1433606 Dereference before null check
authorVolker Lendecke <vl@samba.org>
Tue, 27 Mar 2018 22:00:46 +0000 (17:00 -0500)
committerJeremy Allison <jra@samba.org>
Wed, 28 Mar 2018 22:21:50 +0000 (00:21 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libads/kerberos_keytab.c

index 85f195abcae362c182c29a3600aa63fc9feb6ed3..8eb7b2a7c6baac508284906251fcccbed87a4359 100644 (file)
@@ -93,7 +93,7 @@ static bool fill_default_spns(TALLOC_CTX *ctx, const char *machine_name,
 
        if (*spns == NULL) {
                *spns = talloc_zero_array(ctx, const char*, 3);
-               if (spns == NULL) {
+               if (*spns == NULL) {
                        return false;
                }
        }