aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-08 20:47:02 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-08 20:47:02 +0200
commit2f25764e51d7272a162d2b9f81d8124f6c1af76e (patch)
tree8cbd8e3c16c82416349feb5fb7365f230dca6250
parente019b564eccaf63ca372db6811dfa3dd6c4d9084 (diff)
parent5425e5ea27e3d5b4ce43c1e2ae40252dd14ddfb0 (diff)
Merge branch 'zecke/fixes/subscr-leak'
At the rhizomatica sites some unauthorized subscribers have a last used from long time ago but a bigger reference count. This means that we have an unbalanced subscr_get/subscr_put that we need to investigate. These two fixes are genuine fixes but are unlikely to fix the issue I am not understanding yet.
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c1
-rw-r--r--openbsc/src/libmsc/smpp_openbsc.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 442e84c4c..57c10cf7e 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -353,6 +353,7 @@ static void subscr_expire_callback(void *data, long long unsigned int id)
LOGP(DMM, LOGL_DEBUG, "Not expiring subscriber %s (ID %llu)\n",
subscr_name(s), id);
subscr_update_expire_lu(s, conn->bts);
+ subscr_put(s);
return;
}
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;
}