summaryrefslogtreecommitdiff
path: root/src/reqs.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-25 19:20:56 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-25 19:20:56 +0000
commit6992c74bba22981acd866d4b3521b0e31ad15fae (patch)
treeae35d6802874c11ea626d31323040b98574b421e /src/reqs.c
parent284def7321251f4f644eb9462c4c36f799fc1ea0 (diff)
downloadtinyproxy-6992c74bba22981acd866d4b3521b0e31ad15fae.tar.gz
tinyproxy-6992c74bba22981acd866d4b3521b0e31ad15fae.zip
Check to see if request->path is actually allocated before trying to free
it.
Diffstat (limited to 'src/reqs.c')
-rw-r--r--src/reqs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/reqs.c b/src/reqs.c
index 853474c..18bc675 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -1,4 +1,4 @@
-/* $Id: reqs.c,v 1.66 2002-04-25 18:58:08 rjkaes Exp $
+/* $Id: reqs.c,v 1.67 2002-04-25 19:20:56 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
@@ -192,7 +192,13 @@ free_request_struct(struct request_s *request)
safefree(request->protocol);
safefree(request->host);
- safefree(request->path);
+
+ /*
+ * The path is not used for SSL connection, so don't try to delete
+ * it.
+ */
+ if (request->path)
+ safefree(request->path);
safefree(request);
}