[libosmo-sccp PATCH 2/7] m2ua: remove unset talloc context.

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/.

Diego Elio Pettenò flameeyes at flameeyes.eu
Wed Jul 4 21:38:04 UTC 2012


This might not be the correct approach, but right now the context is
always NULL, so remove the variable and push it as a constant instead.

Signed-off-by: Diego Elio Pettenò <flameeyes at flameeyes.eu>
---
 src/m2ua_msg.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/m2ua_msg.c b/src/m2ua_msg.c
index c04586f..af59376 100644
--- a/src/m2ua_msg.c
+++ b/src/m2ua_msg.c
@@ -26,14 +26,13 @@
 
 #include <string.h>
 
-static void *tall_m2ua;
 static int DM2UA = -1;
 
 struct m2ua_msg *m2ua_msg_alloc(void)
 {
 	struct m2ua_msg *msg;
 
-	msg = talloc_zero(tall_m2ua, struct m2ua_msg);
+	msg = talloc_zero(NULL, struct m2ua_msg);
 	if (!msg) {
 		LOGP(DM2UA, LOGL_ERROR, "Failed to allocate.\n");
 		return NULL;
-- 
1.7.8.6





More information about the OpenBSC mailing list