Harald Welte has submitted this change and it was merged.

Change subject: libbsc: set_net_mcc_mnc_apply: Fix memleak on parsing incorrect 
mcc mnc
......................................................................


libbsc: set_net_mcc_mnc_apply: Fix memleak on parsing incorrect mcc mnc

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

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



diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c 
b/openbsc/src/libbsc/bsc_ctrl_commands.c
index 8b8685a..e6c49d1 100644
--- a/openbsc/src/libbsc/bsc_ctrl_commands.c
+++ b/openbsc/src/libbsc/bsc_ctrl_commands.c
@@ -187,11 +187,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/7746
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I507b0eced7d86f8e978012f6c19f728cd481196b
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to