From: Fabian Keil Date: Mon, 29 May 2017 10:15:15 +0000 (+0000) Subject: remove_tag_for_client(): Remove a harmless 'dead store' X-Git-Tag: v_3_0_27~144 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=ebe3afb8dd443a80d29c06fad3b9c37484d36ff5 remove_tag_for_client(): Remove a harmless 'dead store' ... and make the code easier to understand. --- diff --git a/client-tags.c b/client-tags.c index 21d3fcf6..da925452 100644 --- a/client-tags.c +++ b/client-tags.c @@ -473,17 +473,16 @@ static void remove_tag_for_client(const char *client_address, const char *tag) /* Client has preceding client */ clients_with_tags->prev->next = clients_with_tags->next; } - freez(clients_with_tags->client); if (clients_with_tags == requested_tags) { - /* Removing last tag */ - freez(requested_tags); - clients_with_tags = requested_tags; - } - else - { - freez(clients_with_tags); + /* + * We're in the process of removing the last tag, + * mark the global list as empty. + */ + requested_tags = NULL; } + freez(clients_with_tags->client); + freez(clients_with_tags); } freez(enabled_tags->name); freez(enabled_tags);