From 7b54e32c63341ef6d12ec80e295c57f2c447fb48 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 7 Sep 2015 22:41:45 +0200 Subject: [PATCH] hnbap: Don't enqueue a NULL msgb for transmit --- src/hnbgw_hnbap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 65e5cc96..cdd4895d 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -16,6 +16,9 @@ static int hnbgw_hnbap_tx(struct hnb_context *ctx, struct msgb *msg) { + if (!msg) + return -EINVAL; + msgb_ppid(msg) = IUH_PPI_HNBAP; return osmo_wqueue_enqueue(&ctx->wqueue, msg); }