aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/msgb.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/msgb.c')
-rw-r--r--openbsc/src/msgb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/msgb.c b/openbsc/src/msgb.c
index 0f8627a27..914b36ae7 100644
--- a/openbsc/src/msgb.c
+++ b/openbsc/src/msgb.c
@@ -26,6 +26,7 @@
#include <openbsc/msgb.h>
#include <openbsc/gsm_data.h>
#include <openbsc/talloc.h>
+#include <openbsc/debug.h>
static void *tall_msgb_ctx;
@@ -35,8 +36,10 @@ struct msgb *msgb_alloc(u_int16_t size, const char *name)
msg = _talloc_zero(tall_msgb_ctx, sizeof(*msg) + size, name);
- if (!msg)
+ if (!msg) {
+ LOGP(DRSL, LOGL_FATAL, "unable to allocate msgb\n");
return NULL;
+ }
msg->data_len = size;
msg->len = 0;