Commit 5d5badfc authored by Dmitry Frank's avatar Dmitry Frank Committed by Cesanta Bot

Fix memory leak in big_upload example

PUBLISHED_FROM=e6ccbd73b27985fbf9949adc3e07c90a75f75603
parent 4cf9f99a
......@@ -33,6 +33,7 @@ static void handle_upload(struct mg_connection *nc, int ev, void *p) {
"HTTP/1.1 500 Failed to open a file\r\n"
"Content-Length: 0\r\n\r\n");
nc->flags |= MG_F_SEND_AND_CLOSE;
free(data);
return;
}
nc->user_data = (void *) data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment