Revision: 14757
Author: adrian.chadd
Date: Sun Aug 22 00:08:45 2010
Log: Don't leak the membuf contents if errorpages aren't appended.


http://code.google.com/p/lusca-cache/source/detail?r=14757

Modified:
 /branches/LUSCA_HEAD/src/errorpage.c

=======================================
--- /branches/LUSCA_HEAD/src/errorpage.c        Mon Aug  9 23:40:37 2010
+++ /branches/LUSCA_HEAD/src/errorpage.c        Sun Aug 22 00:08:45 2010
@@ -672,7 +672,9 @@
            name, err->xerrno);
        /* Only append the body if we need to */
        /* XXX this shouldn't be done here? */
-       if (! Config.onoff.blank_error_pages)
+       if (Config.onoff.blank_error_pages)
+               memBufClean(&content);
+       else
                httpBodySet(&rep->body, &content);
        /* do not memBufClean() the content, it was absorbed by httpBody */
     }

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to