diff options
Diffstat (limited to 'openbsc/src')
-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 128ea6518..a1b6210e4 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -276,7 +276,8 @@ static int forward_to_bsc(struct ctrl_cmd *cmd) } pending->ccon = cmd->ccon; pending->ccon->closed_cb = ctrl_conn_closed_cb; - pending->cmd = cmd; + /* Copy command since it will be free()d after we exit here */ + pending->cmd = ctrl_cmd_cpy(pending, cmd); /* Setup the timeout */ osmo_timer_setup(&pending->timeout, pending_timeout_cb, |