summaryrefslogtreecommitdiffhomepage
path: root/src/transparent-proxy.c
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-10-02 15:27:43 +0530
committerMukund Sivaraman <muks@banu.com>2009-10-02 15:27:43 +0530
commiteab4ae000b82fdb54b5c3d1771e03d1cca6dada1 (patch)
tree3a9358f5ca77481938257df9968733d936703853 /src/transparent-proxy.c
parent931b038b27b4101d9c492443fbb05c4a88265f65 (diff)
url variable modified in do_transparent_proxy() is not the url variable in the caller
Diffstat (limited to 'src/transparent-proxy.c')
-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",