surf-adblock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit cb128e7fe7db0319770a0e6d7ccd691385b700ad
parent 4372e931d7e1131c49406bb5d30917be4b37db89
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 14 Jul 2016 22:56:11 +0200

strdup for request is not needed (ty quinq)

Diffstat:
surf-adblock.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/surf-adblock.c b/surf-adblock.c @@ -697,7 +697,7 @@ sendrequest(WebKitWebPage *wp, WebKitURIRequest *req, struct filterrule *r; char *uri = estrdup((char *)webkit_web_page_get_uri(p->webpage)); - char *requri = estrdup((char *)webkit_uri_request_get_uri(req)); + char *requri = (char *)webkit_uri_request_get_uri(req); char *domain, *s; /* TODO: improve, hacky */ @@ -719,12 +719,10 @@ sendrequest(WebKitWebPage *wp, WebKitURIRequest *req, fprintf(stderr, "blocked: %s, %s\n", domain, requri); free(uri); - free(requri); return TRUE; } } free(uri); - free(requri); return FALSE; }