From 7d2843df4ced427b336b7013759e3998bde7d8fb Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 30 Oct 2019 03:57:01 +0100 Subject: [PATCH] fix double free in osmo_gsup_client_enc_send() Change-Id: Iee675fd498ab0867ac2411d9142358f513276182 --- src/gsupclient/gsup_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gsupclient/gsup_client.c b/src/gsupclient/gsup_client.c index c8408fd5..814d5a2f 100644 --- a/src/gsupclient/gsup_client.c +++ b/src/gsupclient/gsup_client.c @@ -386,7 +386,8 @@ int osmo_gsup_client_enc_send(struct osmo_gsup_client *gsupc, rc = osmo_gsup_client_send(gsupc, gsup_msgb); if (rc) { LOGP(DLGSUP, LOGL_ERROR, "Couldn't send GSUP message\n"); - goto error; + /* Do not free, osmo_gsup_client_send() already has. */ + return rc; } return 0;