[MERGED] osmo-mgw[master]: mgcp_test: fix possible double free

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Dec 5 10:19:39 UTC 2017


dexter has submitted this change and it was merged.

Change subject: mgcp_test: fix possible double free
......................................................................


mgcp_test: fix possible double free

Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a
---
M tests/mgcp/mgcp_test.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index ee49eef..330d24d 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -685,7 +685,8 @@
 				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);

-- 
To view, visit https://gerrit.osmocom.org/5175
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list