From 44e23b2a451f7d3465fdedc32c58ac0078925686 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Fri, 23 Feb 2024 02:42:11 +0100 Subject: [PATCH] gsup_client: don't leak the PDU when calloc failed --- src/libcharon/plugins/osmo_epdg/gsup_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcharon/plugins/osmo_epdg/gsup_client.c b/src/libcharon/plugins/osmo_epdg/gsup_client.c index 406bc7225..841af75bb 100644 --- a/src/libcharon/plugins/osmo_epdg/gsup_client.c +++ b/src/libcharon/plugins/osmo_epdg/gsup_client.c @@ -590,6 +590,7 @@ static bool on_recv_pdu(void *data, osmo_epdg_ipa_client_t *client, struct msgb resp = calloc(1, sizeof(*resp)); if (!resp) { + free(pdu); return TRUE; }