aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_11.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 12:29:37 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 12:29:37 +0800
commitcea722bc51441d3f40fde3ed834f592e6073cf8e (patch)
tree36e7ea549d84dc199f6ed81d74a2065bb50c0361 /openbsc/src/gsm_04_11.c
parent6a3d765bf97349535602ed5b2b55d2093aa18d71 (diff)
gsm_04_11: Speculative leak fix for the SMS...
Diffstat (limited to 'openbsc/src/gsm_04_11.c')
-rw-r--r--openbsc/src/gsm_04_11.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 75ce427ae..3d7f7e165 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -802,8 +802,6 @@ static int gsm411_rx_rp_error(struct msgb *msg, struct gsm_trans *trans,
sms_free(sms);
trans->sms.sms = NULL;
- //trans_free(trans);
-
return 0;
}
@@ -1168,6 +1166,12 @@ static int subscr_sig_cb(unsigned int subsys, unsigned int signal,
void _gsm411_sms_trans_free(struct gsm_trans *trans)
{
+ if (trans->sms.sms) {
+ LOGP(DSMS, LOGL_ERROR, "Transaction contains SMS.\n");
+ sms_free(trans->sms.sms);
+ trans->sms.sms = NULL;
+ }
+
bsc_del_timer(&trans->sms.cp_timer);
}