projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7737d9
)
pcrs_filter_response(): Free the old data if there are no hits
author
Fabian Keil
<fk@fabiankeil.de>
Thu, 24 Sep 2020 08:44:00 +0000
(10:44 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Sat, 26 Sep 2020 09:32:39 +0000
(11:32 +0200)
... and it's different from the data in iob and the new data.
Fixes a memory leak if multiple filters are executed
and the last one is skipped due to a pcre error.
filters.c
patch
|
blob
|
history
diff --git
a/filters.c
b/filters.c
index
13cba16
..
7b586bc
100644
(file)
--- a/
filters.c
+++ b/
filters.c
@@
-1671,6
+1671,10
@@
static char *pcrs_filter_response(struct client_state *csp)
*/
if (!hits)
{
+ if (old != csp->iob->cur && old != new)
+ {
+ freez(old);
+ }
freez(new);
return(NULL);
}