mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-02 06:22:52 +07:00
Fix memory leak in big_upload example
PUBLISHED_FROM=e6ccbd73b27985fbf9949adc3e07c90a75f75603
This commit is contained in:
committed by
Cesanta Bot
parent
4cf9f99ae9
commit
5d5badfcee
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user