gprs_ms_stoage: Release all MS in ms_storage cleanup()
This makes sure all MS and TBF objects under a bts are freed when its
underlaying storage is freed (cleanup() is called).
Related: OS#5555
Change-Id: Idf3ad8b70c97313dec38a49d48cf36d6c9b404c7
diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp
index f980824..c9a41c9 100644
--- a/src/gprs_ms_storage.cpp
+++ b/src/gprs_ms_storage.cpp
@@ -61,7 +61,10 @@
llist_for_each_safe(pos, tmp, &m_list) {
struct GprsMs *ms = llist_entry(pos, typeof(*ms), list);
ms_set_callback(ms, NULL);
- ms_storage_ms_idle_cb(ms);
+ ms_set_timeout(ms, 0);
+ llist_del(&ms->list);
+ bts_stat_item_dec(ms->bts, STAT_MS_PRESENT);
+ talloc_free(ms);
}
}