X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=client-tags.c;h=da925452b8a947bbec31f42f43bf44e0dc6c000d;hp=21d3fcf61b2ea72e47be413e5e562f942227b508;hb=9eeb39382a0d70b900b889e98d69ce584527ac1a;hpb=e6cd35ae9b23649990e7e05d8cc12bbb471cd5d5 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);