[PATCH 1/2] subscr: Fix potential subscr ref count issue

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Holger
Tue Aug 4 11:18:08 UTC 2015


From: Holger Hans Peter Freyther <holger at moiji-mobile.com>

In case the subscriber is currently busy we would omit the
subscr_put. This seems to be very hard to hit as the subscr
need to be active and at the same time be selected for the
purge operation.
---
 openbsc/src/libmsc/gsm_subscriber.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 4559de5..085acb1 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;
 	}
 
-- 
2.3.5




More information about the OpenBSC mailing list