Change in openbsc[master]: bsc-nat: forward_sccp_to_msc: Fix memleak on receive from non authent...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jun 8 16:19:00 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9509 )

Change subject: bsc-nat: forward_sccp_to_msc: Fix memleak on receive from non authenticated bsc
......................................................................

bsc-nat: forward_sccp_to_msc: Fix memleak on receive from non authenticated bsc

variable "parsed" was not being freed in this case. By calling exit2 we
make sure it is freed.

Change-Id: Ifd0c145ff733fdfb2f6fcb32065de99ee951d106
---
M openbsc/src/osmo-bsc_nat/bsc_nat.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 928dd4c..373ba97 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1124,8 +1124,7 @@
 	 */
 	if (!bsc->authenticated) {
 		LOGP(DNAT, LOGL_ERROR, "BSC is not authenticated.\n");
-		msgb_free(msg);
-		return -1;
+		goto exit2;
 	}
 
 

-- 
To view, visit https://gerrit.osmocom.org/9509
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd0c145ff733fdfb2f6fcb32065de99ee951d106
Gerrit-Change-Number: 9509
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180608/08b016f1/attachment.htm>


More information about the gerrit-log mailing list