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

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


Hello jfdionne, Max, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1656

to look at the new patch set (#3).

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/1656/3

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: newpatchset
Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
Gerrit-PatchSet: 3
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