Introduction
Introduction Statistics Contact Development Disclaimer Help
strdup for request is not needed (ty quinq) - surf-adblock - Surf adblock web e…
git clone git://git.codemadness.org/surf-adblock
Log
Files
Refs
README
LICENSE
---
commit cb128e7fe7db0319770a0e6d7ccd691385b700ad
parent 4372e931d7e1131c49406bb5d30917be4b37db89
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 14 Jul 2016 22:56:11 +0200
strdup for request is not needed (ty quinq)
Diffstat:
M 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;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.