From cfc28b67486c4c4ec087097952cefe3ca2745e9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 7 Oct 2009 22:11:52 +0000 Subject: [PATCH] * don't leak post data * set post data length, since there are still some functions dependg on it --- webcit/webcit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webcit/webcit.c b/webcit/webcit.c index 8ba672388..2aaca0060 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -521,6 +521,7 @@ void ReadPostData(void) free(Buf); } else if (WCC->Hdr->HR.ContentLength > 0) { WCC->upload = content; + WCC->upload_length = StrLength(WCC->upload); content = NULL; } FreeStrBuf(&content); @@ -850,10 +851,9 @@ SessionDetachModule_WEBCIT { DeleteHash(&sess->Directory); - if (sess->upload_length > 0) { - FreeStrBuf(&sess->upload); - sess->upload_length = 0; - } + FreeStrBuf(&sess->upload); + sess->upload_length = 0; + FreeStrBuf(&sess->trailing_javascript); if (StrLength(sess->WBuf) > SIZ * 30) /* Bigger than 120K? release. */ -- 2.39.2