libads: Fix CID 1433606 Dereference before null check
[samba.git] / 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;
                }
        }