From f268b8518415a5cf896e1b3518c2a0141d1364d4 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 18 Oct 2015 13:43:53 +0200 Subject: [PATCH] Fix check for return value of malloc(). --- utcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utcp.c b/utcp.c index 354cbe5..ce05690 100644 --- a/utcp.c +++ b/utcp.c @@ -365,7 +365,7 @@ static void ack(struct utcp_connection *c, bool sendatleastone) { } *pkt; pkt = malloc(sizeof pkt->hdr + c->utcp->mtu); - if(!pkt->data) + if(!pkt) return; pkt->hdr.src = c->src; -- 2.39.5