Harald Welte has submitted this change and it was merged.

Change subject: bsc_nat: forward_to_bsc: Fix memleak on send failure
......................................................................


bsc_nat: forward_to_bsc: Fix memleak on send failure

Change-Id: If0dfae40f03db297eeb4e296daf5fe78ba53a11b
---
M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c 
b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
index 797ddf8..d6bf1e5 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
@@ -219,7 +219,7 @@
        int ret = CTRL_CMD_HANDLED;
        struct ctrl_cmd *bsc_cmd = NULL;
        struct bsc_connection *bsc;
-       struct bsc_cmd_list *pending;
+       struct bsc_cmd_list *pending = NULL;
        unsigned int nr;
        char *bsc_variable;
 
@@ -292,6 +292,7 @@
        cmd->reply = "no BSC with this nr";
 err:
        ret = CTRL_CMD_ERROR;
+       talloc_free(pending);
 done:
        talloc_free(bsc_cmd);
        return ret;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0dfae40f03db297eeb4e296daf5fe78ba53a11b
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