From e47e1346493b2f87a7eac6965468dbe45dbd19d1 Mon Sep 17 00:00:00 2001 From: oes Date: Fri, 28 Feb 2003 12:53:06 +0000 Subject: [PATCH] Fixed two mostly harmless mem leaks --- jcc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jcc.c b/jcc.c index 8bdfa817..cb81afee 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.1 2002/09/25 14:52:24 oes Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.2 2002/11/20 14:37:47 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/jcc.c,v $ @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.1 2002/09/25 14:52:24 oes Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.92.2.2 2002/11/20 14:37:47 oes + * Fix: Head of global clients list now initialized to NULL + * * Revision 1.92.2.1 2002/09/25 14:52:24 oes * Added basic support for OPTIONS and TRACE HTTP methods: * - New interceptor direct_response() added in chat(). @@ -857,6 +860,7 @@ static void chat(struct client_state *csp) log_error(LOG_LEVEL_CLF, "%s - - [%T] \" \" 400 0", csp->ip_addr_str); + free_http_request(http); return; } @@ -1366,13 +1370,13 @@ static void chat(struct client_state *csp) || write_socket(csp->cfd, p != NULL ? p : csp->iob->cur, csp->content_length)) { log_error(LOG_LEVEL_ERROR, "write modified content to client failed: %E"); + freez(hdr); + freez(p); return; } freez(hdr); - if (NULL != p) { - freez(p); - } + freez(p); } break; /* "game over, man" */ -- 2.49.0