aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-02-07 11:46:41 +0100
committerMax <msuraev@sysmocom.de>2017-02-07 11:46:41 +0100
commit5fd93e02f818aecfc73db66e8064858442122959 (patch)
tree1e1453982f8938d1ae6cec47859d02be11131693
parent8d3384290ba7c79b290b492dd1279041fb578a9c (diff)
Fix potential NULL dereference
-rw-r--r--src/osmux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmux.c b/src/osmux.c
index 0bee9cc..913d68f 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -394,7 +394,8 @@ void osmux_xfrm_input_deliver(struct osmux_in_handle *h)
LOGP(DLMIB, LOGL_DEBUG, "invoking delivery function\n");
#endif
batch_msg = osmux_build_batch(batch, h->batch_size, h->batch_factor);
-
+ if (!batch_msg)
+ return;
h->stats.output_osmux_msgs++;
h->stats.output_osmux_bytes += batch_msg->len;