Fix cmd leak on ACL rejection.

master
Nicolas Favre-Felix 14 years ago
parent b7182e8c7e
commit 28b69b7adf

@ -316,6 +316,10 @@ http_on_complete(http_parser *p) {
if(ret < 0) {
c->state = CLIENT_WAITING;
if(c->cmd) {
cmd_free(c->cmd);
c->cmd = NULL;
}
http_send_error(c, 403, "Forbidden");
}
@ -445,6 +449,7 @@ void
http_send_error(struct http_client *c, short code, const char *msg) {
http_send_reply(c, code, msg, NULL, 0);
http_client_cleanup(c);
}
/* Transfer-encoding: chunked */

Loading…
Cancel
Save