cgi_show_status: Don't leak memory when no filter files are specified
[privoxy.git] / cgisimple.c
index e738a60..a8fd826 100644 (file)
@@ -1087,7 +1087,7 @@ static char *get_block_reason_statistics_table(const struct client_state *csp)
             }
             get_block_reason_count(block_reason, &count);
             snprintf(buf, sizeof(buf),
-               "<tr><td>%s</td><td style=\"text-align: right\">%llu</td>",
+               "<tr><td>%s</td><td style=\"text-align: right\">%llu</td>\n",
                encoded_block_reason, count);
             freez(encoded_block_reason);
 
@@ -1380,6 +1380,7 @@ jb_err cgi_show_status(struct client_state *csp,
    {
       if (!err) err = map(exports, "re-filter-filenames", 1, "<tr><td>None specified</td></tr>", 1);
       if (!err) err = map_block_killer(exports, "have-filterfile");
+      freez(s);
    }
 
 #ifdef FEATURE_TRUST