From d6d81093beff952c9b1fb69d9143101c715055c6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 21 Jan 2015 02:17:53 +1100 Subject: [PATCH] Fix impossible warnings in drop_client --- src/stratifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 18a625aa..8e3c6264 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1301,12 +1301,13 @@ static void drop_client(sdata_t *sdata, int64_t id) /* We can't delete the ram safely in this loop, even if we can * safely remove the entry from the linked list so we do it on * the next pass through the loop. */ - dealloc(client_delete); + if (client != client_delete) + dealloc(client_delete); if (!client->ref) { LOGINFO("Stratifier discarding dead instance %ld", client->id); __del_dead(sdata, client); - free(client->workername); - free(client->useragent); + dealloc(client->workername); + dealloc(client->useragent); client_delete = client; } }