summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-17 16:34:42 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-17 16:34:42 +0000
commite4e78e0f1b061698c66e327a3fbdab8a14d98c53 (patch)
treea519112b3ae453359aba902764f2b166d3940fa0 /src
parentbb9f20652998ec87d364c59de88169b531092558 (diff)
downloadtinyproxy-e4e78e0f1b061698c66e327a3fbdab8a14d98c53.tar.gz
tinyproxy-e4e78e0f1b061698c66e327a3fbdab8a14d98c53.zip
request->host might have been freed by the time we get to
free_request_struct(), so make sure it's pointing to memory.
Diffstat (limited to 'src')
-rw-r--r--src/reqs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/reqs.c b/src/reqs.c
index cd78d01..76db3db 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -1,4 +1,4 @@
-/* $Id: reqs.c,v 1.72 2002-05-14 00:43:38 rjkaes Exp $
+/* $Id: reqs.c,v 1.73 2002-05-17 16:34:42 rjkaes Exp $
*
* This is where all the work in tinyproxy is actually done. Incoming
* connections have a new thread created for them. The thread then
@@ -189,12 +189,8 @@ free_request_struct(struct request_s *request)
safefree(request->method);
safefree(request->protocol);
- safefree(request->host);
-
- /*
- * The path is not used for SSL connection, so don't try to delete
- * it.
- */
+ if (request->host)
+ safefree(request->host);
if (request->path)
safefree(request->path);