diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-08-04 12:22:56 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-08-04 13:16:24 +0200 |
commit | 56cc9b8543065dd40bfcc046fdab22c6c29efde5 (patch) | |
tree | 431397cd31155ec6fd770c8c241d68ae31fb8f09 | |
parent | e398b39943c0fd0cd0d76f0a01509f885352ffc9 (diff) |
subscr: Fix subscr refcount issue in case of message errorzecke/fixes/subscr-leak
In case the SMPP payload didn't include the right fields we
would leak the subscr reference count.
-rw-r--r-- | openbsc/src/libmsc/smpp_openbsc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 057a9d048..a2fa0f4b5 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -110,6 +110,7 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net, /* ERROR: we cannot have both! */ LOGP(DLSMS, LOGL_ERROR, "SMPP Cannot have payload in " "TLV _and_ in the header\n"); + subscr_put(dest); return ESME_ROPTPARNOTALLWD; } sms_msg = t->value.octet; @@ -120,6 +121,7 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net, } else { LOGP(DLSMS, LOGL_ERROR, "SMPP neither message payload nor valid sm_length.\n"); + subscr_put(dest); return ESME_RINVPARLEN; } |