diff mbox series

[08/23] mongoose: Remove double free calls

Message ID 20240612144010.470339-9-Michael.Glembotzki@iris-sensing.com
State Changes Requested
Headers show
Series Update Mongoose Version to 7.14 | expand

Commit Message

Michael Glembotzki June 12, 2024, 2:36 p.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);