[PATCH] osmo-bts[master]: Fix memleak

Max gerrit-no-reply at lists.osmocom.org
Wed Jan 11 10:02:57 UTC 2017


Review at  https://gerrit.osmocom.org/1566

Fix memleak

Max's note: added same fix to sysmobts.

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


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/1566/1

diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 99533d7..c70bd9e 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -647,6 +647,7 @@
 
 	/* ignore every time indication, except for c0 */
 	if (trx != bts->c0) {
+		msgb_free(msg);
 		return 0;
 	}
 
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index ad9aa64..82db8d7 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -642,6 +642,7 @@
 
 	/* ignore every time indication, except for c0 */
 	if (trx != bts->c0) {
+		msgb_free(msg);
 		return 0;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>


More information about the gerrit-log mailing list