aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/sigtran/xua_msg.h6
-rw-r--r--src/xua_msg.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index 9c3c49c..99d3e78 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -73,7 +73,11 @@ void osmo_xua_msg_tall_ctx_init(void *ctx);
#define xua_msg_alloc() _xua_msg_alloc(__FILE__, __LINE__)
struct xua_msg *_xua_msg_alloc(const char *file, int line);
-void xua_msg_free(struct xua_msg *msg);
+#define xua_msg_free(msg) do { \
+ printf("xua_msg_free(): %s:%d: %p\n", __FILE__, __LINE__, msg); \
+ _xua_msg_free(msg); \
+}while(0)
+void _xua_msg_free(struct xua_msg *msg);
int xua_msg_add_data(struct xua_msg *msg, uint16_t tag, uint16_t len, uint8_t *dat);
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 21c48a3..e560af4 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -54,7 +54,7 @@ struct xua_msg *_xua_msg_alloc(const char *file, int line)
return msg;
}
-void xua_msg_free(struct xua_msg *msg)
+void _xua_msg_free(struct xua_msg *msg)
{
talloc_free(msg);
}