diff mbox series

[V3,06/21] mongoose: Remove double free calls

Message ID 20240709111440.8215-7-Michael.Glembotzki@iris-sensing.com
State Accepted
Headers show
Series mongoose: Update to version 7.14 | expand

Commit Message

Michael Glembotzki July 9, 2024, 11:08 a.m. UTC
mp_streami->part.name and mp_stream->part.filename are already freed in
mg_http_free_proto_data_mp_stream().

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_multipart.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_multipart.c b/mongoose/mongoose_multipart.c
index fb62c1e4..3361169c 100644
--- a/mongoose/mongoose_multipart.c
+++ b/mongoose/mongoose_multipart.c
@@ -142,10 +142,6 @@  static void mg_http_multipart_finalize(struct mg_connection *c) {
 	struct mg_http_multipart_stream *mp_stream = c->pfn_data;
 
 	mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_END, NULL, 0);
-	free((void *) mp_stream->part.filename.ptr);
-	mp_stream->part.filename.ptr = NULL;
-	free((void *) mp_stream->part.name.ptr);
-	mp_stream->part.name.ptr = NULL;
 	mg_http_free_proto_data_mp_stream(mp_stream);
 	mp_stream->state = MPS_FINISHED;
 	free(mp_stream);