summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/transparent-proxy.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transparent-proxy.c b/src/transparent-proxy.c
index 907f51d..8144e42 100644
--- a/src/transparent-proxy.c
+++ b/src/transparent-proxy.c
@@ -86,7 +86,9 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
request->path = (char *) safemalloc (ulen + 1);
strlcpy (request->path, url, ulen + 1);
- safefree (url);
+ /* url overwritten by the call below is the url passed
+ * to this function, and is not the url variable in the
+ * caller. */
build_url (&url, request->host, request->port, request->path);
log_message (LOG_INFO,
"process_request: trans IP %s %s for %d",
@@ -102,7 +104,9 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
request->path = (char *) safemalloc (ulen + 1);
strlcpy (request->path, url, ulen + 1);
- safefree (url);
+ /* url overwritten by the call below is the url passed
+ * to this function, and is not the url variable in the
+ * caller. */
build_url (&url, request->host, request->port, request->path);
log_message (LOG_INFO,
"process_request: trans Host %s %s for %d",