diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-11 17:12:43 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-11 17:13:07 +0200 |
commit | 58ee5b05c8b0d14da0f8a360a6de11a41997ea06 (patch) | |
tree | b30ea4541bf0f414a297d4d904d8907a14810e7f /openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c | |
parent | 2bfa98dcd75d24e27cc23a060247b8ed5f7245f5 (diff) |
bsc_nat: forward_to_bsc: Fix memleak on send failure
Change-Id: If0dfae40f03db297eeb4e296daf5fe78ba53a11b
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index 797ddf89a..d6bf1e548 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 @@ static int forward_to_bsc(struct ctrl_cmd *cmd) 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 @@ static int forward_to_bsc(struct ctrl_cmd *cmd) cmd->reply = "no BSC with this nr"; err: ret = CTRL_CMD_ERROR; + talloc_free(pending); done: talloc_free(bsc_cmd); return ret; |