From 30d2ebddd6eb1fd62deff137aa2c8eab55f2efc3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 24 Dec 2009 09:43:25 +0100 Subject: move msgb talloc context into talloc_ctx.c This keeps the ordering right, independent of link ordering, it will ensure that the talloc dump will also catch msgb related memory leaks. --- openbsc/src/msgb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'openbsc/src/msgb.c') diff --git a/openbsc/src/msgb.c b/openbsc/src/msgb.c index 48a5a7b03..9f2fcfa96 100644 --- a/openbsc/src/msgb.c +++ b/openbsc/src/msgb.c @@ -28,7 +28,7 @@ #include #include -static void *tall_msgb_ctx; +void *tall_msgb_ctx; struct msgb *msgb_alloc(u_int16_t size, const char *name) { @@ -96,8 +96,3 @@ void msgb_reset(struct msgb *msg) msg->l3h = NULL; msg->smsh = NULL; } - -static __attribute__((constructor)) void on_dso_load_trau_msgb(void) -{ - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 1, "msgb"); -} -- cgit v1.2.3