[PATCH] osmo-bsc[master]: libbsc: set_net_mcc_mnc_apply: Fix memleak on parsing incorr...

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Apr 11 10:42:02 UTC 2018


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

libbsc: set_net_mcc_mnc_apply: Fix memleak on parsing incorrect mcc mnc

Change-Id: I43513e108dfba24efb091d56b3fdfdb0cd0af727
---
M src/libbsc/bsc_ctrl_commands.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/7747/1

diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 64f4589..171feaf 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -149,11 +149,13 @@
 
 	if (osmo_mcc_from_str(mcc_str, &plmn.mcc)) {
 		cmd->reply = "Error while decoding MCC";
+		talloc_free(tmp);
 		return CTRL_CMD_ERROR;
 	}
 
 	if (osmo_mnc_from_str(mnc_str, &plmn.mnc, &plmn.mnc_3_digits)) {
 		cmd->reply = "Error while decoding MNC";
+		talloc_free(tmp);
 		return CTRL_CMD_ERROR;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43513e108dfba24efb091d56b3fdfdb0cd0af727
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list