projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
65c6258
)
Fix memory leak in cgi_show_status() with extended statistics enabled
author
Fabian Keil
<fk@fabiankeil.de>
Tue, 10 Nov 2020 10:37:21 +0000
(11:37 +0100)
committer
Fabian Keil
<fk@fabiankeil.de>
Wed, 18 Nov 2020 11:01:49 +0000
(12:01 +0100)
CID 305235
cgisimple.c
patch
|
blob
|
history
diff --git
a/cgisimple.c
b/cgisimple.c
index
4339ecd
..
592e704
100644
(file)
--- a/
cgisimple.c
+++ b/
cgisimple.c
@@
-1280,26
+1280,28
@@
jb_err cgi_show_status(struct client_state *csp,
#endif /* ndef FEATURE_STATISTICS */
#ifdef FEATURE_EXTENDED_STATISTICS
#endif /* ndef FEATURE_STATISTICS */
#ifdef FEATURE_EXTENDED_STATISTICS
+ if (!err)
{
char *block_reason_statistics = get_block_reason_statistics_table(csp);
if (block_reason_statistics != NULL)
{
{
char *block_reason_statistics = get_block_reason_statistics_table(csp);
if (block_reason_statistics != NULL)
{
-
if (!err)
err = map(exports, "block-reason-statistics", 1, block_reason_statistics, 0);
+ err = map(exports, "block-reason-statistics", 1, block_reason_statistics, 0);
}
else
{
}
else
{
-
if (!err)
err = map_block_killer(exports, "extended-statistics");
+ err = map_block_killer(exports, "extended-statistics");
}
}
}
}
+ if (!err)
{
char *filter_statistics = get_filter_statistics_table(csp);
if (filter_statistics != NULL)
{
{
char *filter_statistics = get_filter_statistics_table(csp);
if (filter_statistics != NULL)
{
-
if (!err)
err = map(exports, "filter-statistics", 1, filter_statistics, 0);
+ err = map(exports, "filter-statistics", 1, filter_statistics, 0);
}
else
{
}
else
{
-
if (!err)
err = map_block_killer(exports, "extended-statistics");
+ err = map_block_killer(exports, "extended-statistics");
}
}
#else /* ndef FEATURE_EXTENDED_STATISTICS */
}
}
#else /* ndef FEATURE_EXTENDED_STATISTICS */