summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-11 02:58:00 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-12 05:25:56 +0200
commit28c8a4bf2fbee013a2c82e19063940ec4cc80414 (patch)
tree40ed24c820f77119abe712afd623d6107ab3d719 /include
parent6f103ae2b57f769d1e2f4193f26de5c414ae0d94 (diff)
add osmo_xua_msg_tall_ctx_init()
So far the tall_xua ctx used to allocate from in xua_msg_alloc() was never initialized, actually hiding memory leaks from the talloc report. Add this API to allow branching the xua_msg ctx off a sane root ctx. Explicitly initialize tall_xua to NULL, so that, if xua_msg_ctx_init() isn't called, tall_xua is still guaranteed to not be a random pointer. osmo-bsc will use this function to hook the tall_xua ctx to osmo-bsc's own root ctx. Change-Id: I618878680a096a7f7fc2d83098590f2e4cb08870
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sigtran/xua_msg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index 423adbc..e912e02 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -69,6 +69,8 @@ struct xua_msg_event_map {
extern const struct xua_dialect xua_dialect_sua;
extern const struct xua_dialect xua_dialect_m3ua;
+void osmo_xua_msg_tall_ctx_init(void *ctx);
+
struct xua_msg *xua_msg_alloc(void);
void xua_msg_free(struct xua_msg *msg);