From 706f4787e230db0a86b5de9d8c2061c92e570510 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Mon, 9 Nov 2026 17:25:56 -0300 Subject: [PATCH] fix unbalanced allocator set --- mongoose.c | 2 +- src/net_builtin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 15209fc8..a721421e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -11027,7 +11027,7 @@ static struct mg_connection *accept_conn(struct mg_connection *lsn, c->loc.port = lsn->loc.port; if ((l2addr = get_return_l2addr(lsn->mgr->ifp, &c->rem, false, pkt)) == NULL) { - free(c); // safety net for lousy networks, not actually needed + mg_free(c); // safety net for lousy networks, not actually needed return NULL; // as path has already been checked at SYN (sending SYN+ACK) } memcpy(s->mac, l2addr, sizeof(s->mac)); diff --git a/src/net_builtin.c b/src/net_builtin.c index 3cc379cb..edae6918 100644 --- a/src/net_builtin.c +++ b/src/net_builtin.c @@ -1383,7 +1383,7 @@ static struct mg_connection *accept_conn(struct mg_connection *lsn, c->loc.port = lsn->loc.port; if ((l2addr = get_return_l2addr(lsn->mgr->ifp, &c->rem, false, pkt)) == NULL) { - free(c); // safety net for lousy networks, not actually needed + mg_free(c); // safety net for lousy networks, not actually needed return NULL; // as path has already been checked at SYN (sending SYN+ACK) } memcpy(s->mac, l2addr, sizeof(s->mac));