surf

Surf web browser.
git clone git://r-36.net/surf
Log | Files | Refs | README | LICENSE

commit 99376fa57fdd6537600ca819a55d18f890c6a45b
parent 993c62a6f9f3bd27c65034478313955ccbf93d4d
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun,  5 Feb 2017 09:09:28 +0100

Fixing memory management in the new proxy code.

Diffstat:
surf.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/surf.c b/surf.c @@ -1326,7 +1326,6 @@ setup(void) { int i; char *styledirfile, *stylepath; - GProxyResolver *pr; SoupSession *s; GError *error = NULL; @@ -1578,11 +1577,17 @@ void toggleproxy(Client *c, const Arg *arg) { SoupSession *s; + GProxyResolver *pr; /* request handler */ s = webkit_get_default_session(); if (usingproxy) { + pr = NULL; + g_object_get(G_OBJECT(s), "proxy-resolver", &pr); + if (pr != NULL) + g_object_unref(pr); + g_object_set(G_OBJECT(s), "proxy-resolver", NULL, NULL); usingproxy = 0; } else {