]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence REVERSE_INULL warning (CID 306652)
authorMark Andrews <marka@isc.org>
Wed, 9 Sep 2020 00:40:14 +0000 (10:40 +1000)
committerMark Andrews <marka@isc.org>
Wed, 9 Sep 2020 21:01:55 +0000 (21:01 +0000)
lib/isc/unix/socket.c

index a7e6804615da1b351956929fc1464e68cbf4c401..768add0940e250d92abbb0d7e42fae0901690561 100644 (file)
@@ -3771,13 +3771,11 @@ cleanup_thread(isc_mem_t *mctx, isc__socketthread_t *thread) {
        isc_mem_put(thread->manager->mctx, thread->fdstate,
                    thread->manager->maxsocks * sizeof(int));
 
-       if (thread->fdlock != NULL) {
-               for (i = 0; i < FDLOCK_COUNT; i++) {
-                       isc_mutex_destroy(&thread->fdlock[i]);
-               }
-               isc_mem_put(thread->manager->mctx, thread->fdlock,
-                           FDLOCK_COUNT * sizeof(isc_mutex_t));
+       for (i = 0; i < FDLOCK_COUNT; i++) {
+               isc_mutex_destroy(&thread->fdlock[i]);
        }
+       isc_mem_put(thread->manager->mctx, thread->fdlock,
+                   FDLOCK_COUNT * sizeof(isc_mutex_t));
 }
 
 isc_result_t