From: Fabian Keil Date: Sun, 8 May 2016 10:46:05 +0000 (+0000) Subject: remove_tag_for_client(): Silence a coverity warning (CID #161202) X-Git-Tag: v_3_0_25~40 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=da1e7a2c6aef56965785d2fb6d025834186cb378;hp=138747bd3f178c448de25dce2ca1d90de6e0f6cb remove_tag_for_client(): Silence a coverity warning (CID #161202) --- diff --git a/client-tags.c b/client-tags.c index 54c47048..0bcbf353 100644 --- a/client-tags.c +++ b/client-tags.c @@ -365,6 +365,13 @@ static void remove_tag_for_client(const char *client_address, const char *tag) clients_with_tags = clients_with_tags->next; } + assert(clients_with_tags != NULL); + if (clients_with_tags == NULL) + { + log_error(LOG_LEVEL_ERROR, + "Tried to remove tag %s for tag-less client %s", + tag, client_address); + } enabled_tags = clients_with_tags->tags; while (enabled_tags != NULL) {