2
0
Fork 0

fix memory leak in response_send_headers()

personal/stbuehler/wip
Thomas Porzelt 2009-03-28 02:11:05 +01:00
parent 9f8413c112
commit 542031e8a3
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,7 @@ void response_clear(response *resp) {
}
void response_send_headers(connection *con) {
GString *head = g_string_sized_new(8*1024);
GString *head;
vrequest *vr = con->mainvr;
if (vr->response.http_status < 100 || vr->response.http_status > 999) {
@ -31,6 +31,8 @@ void response_send_headers(connection *con) {
return;
}
head = g_string_sized_new(8*1024);
if (0 == con->out->length && con->mainvr->handle_response_body == NULL
&& vr->response.http_status >= 400 && vr->response.http_status < 600) {