From: Wilfried Göesgens Date: Wed, 7 Oct 2009 22:11:52 +0000 (+0000) Subject: * don't leak post data X-Git-Tag: v7.86~789 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=cfc28b67486c4c4ec087097952cefe3ca2745e9a;p=citadel.git * don't leak post data * set post data length, since there are still some functions dependg on it --- 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. */