]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Avoid null dereference. CID #1504060
authorNick Porter <nick@portercomputing.co.uk>
Fri, 15 Apr 2022 11:31:44 +0000 (12:31 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 15 Apr 2022 11:31:44 +0000 (12:31 +0100)
src/lib/io/master.c

index ad1f6d57df0d398fe19b3c30f3d4136248f47879..4fe70d9071531c1173b0fef81d9781153561c980 100644 (file)
@@ -795,7 +795,7 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t const *inst,
                      "Closing it, and diuscarding all packets for connection %s.",
                      inst->app_io->common.name, connection->name);
                pthread_mutex_lock(&client->mutex);
-               (void) fr_hash_table_delete(client->ht, connection);
+               if (client->ht) (void) fr_hash_table_delete(client->ht, connection);
                pthread_mutex_unlock(&client->mutex);
 
        cleanup: