From a330b864e58a5f899c5d8a155f3a788f8c3fb0d9 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 4 Dec 2017 17:16:16 +0100 Subject: [PATCH] mgcp_test: fix possible double free Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a --- tests/mgcp/mgcp_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index ee49eef4f..330d24dc0 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -685,7 +685,8 @@ static void test_messages(void) printf("(response does not contain a connection id)\n"); } - msgb_free(msg); + if (msg) + msgb_free(msg); if (dummy_packets) printf("Dummy packets: %d\n", dummy_packets);