[MERGED] osmo-bts[master]: sysmo, lc15: fix memory leak at each call placed

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Jan 31 11:06:52 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: sysmo,lc15: fix memory leak at each call placed
......................................................................


sysmo,lc15: fix memory leak at each call placed

Max's note: added same fix for default case and ported it to sysmobts.

Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
---
M src/osmo-bts-litecell15/l1_if.c
M src/osmo-bts-sysmo/l1_if.c
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index c70bd9e..0c5ef6b 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1093,8 +1093,10 @@
 		rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg);
 		break;
 	case GsmL1_PrimId_MphSyncInd:
+		msgb_free(msg);
 		break;
 	case GsmL1_PrimId_PhConnectInd:
+		msgb_free(msg);
 		break;
 	case GsmL1_PrimId_PhReadyToSendInd:
 		rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd,
@@ -1107,7 +1109,7 @@
 		rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg);
 		break;
 	default:
-		break;
+		msgb_free(msg);
 	}
 
 	return rc;
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 82db8d7..490264f 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1081,8 +1081,10 @@
 		rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg);
 		break;
 	case GsmL1_PrimId_MphSyncInd:
+		msgb_free(msg);
 		break;
 	case GsmL1_PrimId_PhConnectInd:
+		msgb_free(msg);
 		break;
 	case GsmL1_PrimId_PhReadyToSendInd:
 		rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd,
@@ -1095,7 +1097,7 @@
 		rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg);
 		break;
 	default:
-		break;
+		msgb_free(msg);
 	}
 
 	return rc;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: jfdionne <jf.dionne at nutaq.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: jfdionne <jf.dionne at nutaq.com>



More information about the gerrit-log mailing list