diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-03 19:01:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-15 20:06:46 +0100 |
commit | 05c68841a835b3bbc5a95fa809e136e4e376154c (patch) | |
tree | 6bd4764672fc26a77ad1cfdf66c110fcb4a11aa6 /openbsc/src/osmo_msc.c | |
parent | 85334f1309c89cf99e6ea55ea119c5b0d143cb5f (diff) |
bsc_api: Fix a use after free error in the Clear Request path
The implementation of bsc_hack would call subscr_con_free before
the BSC API has had the chance to call gsm0808_clear to try to
release other channels. Fix that by adding a return value.
Diffstat (limited to 'openbsc/src/osmo_msc.c')
-rw-r--r-- | openbsc/src/osmo_msc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/osmo_msc.c b/openbsc/src/osmo_msc.c index 1fad510fe..0ed973b10 100644 --- a/openbsc/src/osmo_msc.c +++ b/openbsc/src/osmo_msc.c @@ -36,9 +36,10 @@ static void msc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci) gsm411_sapi_n_reject(conn); } -static void msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) +static int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) { gsm0408_clear_request(conn, cause); + return 1; } static int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg, |