Check to see if request->path is actually allocated before trying to free
it.
This commit is contained in:
		
							parent
							
								
									284def7321
								
							
						
					
					
						commit
						6992c74bba
					
				@ -2,6 +2,8 @@
 | 
			
		||||
 | 
			
		||||
	* src/reqs.c (remove_connection_headers): Handle both the
 | 
			
		||||
	Connection header _and_ the Proxy-Connection header.
 | 
			
		||||
	(free_request_struct): Check to see if request->path is actually
 | 
			
		||||
	allocated before trying to delete it.
 | 
			
		||||
 | 
			
		||||
	* src/hashmap.c: The hashmap will now handle multiple keys with
 | 
			
		||||
	the same value.  This change was need because some sites like
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								src/reqs.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user