dns: TALLOC_FREE already checks for !=NULL
authorVolker Lendecke <vl@samba.org>
Thu, 31 May 2018 19:11:16 +0000 (21:11 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 1 Jun 2018 09:28:22 +0000 (11:28 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/dns_server/dns_query.c

index f1facc8..dfcba6e 100644 (file)
@@ -721,9 +721,7 @@ static NTSTATUS create_tkey(struct dns_server *dns,
                return status;
        }
 
-       if (store->tkeys[store->next_idx] != NULL) {
-               TALLOC_FREE(store->tkeys[store->next_idx]);
-       }
+       TALLOC_FREE(store->tkeys[store->next_idx]);
 
        store->tkeys[store->next_idx] = k;
        (store->next_idx)++;