From 0e4d59541a16ae7c75b70aaecc081a6525da292f Mon Sep 17 00:00:00 2001 From: likewise Date: Mon, 27 Jan 2003 12:35:16 +0000 Subject: [PATCH] Fixed assignment of pcb->flags if pcb was NULL in udp_new(). --- src/core/udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/udp.c b/src/core/udp.c index 6fb657c2..cd2e3ba0 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -28,7 +28,7 @@ * * Author: Adam Dunkels * - * $Id: udp.c,v 1.13 2003/01/27 08:50:28 likewise Exp $ + * $Id: udp.c,v 1.14 2003/01/27 12:35:16 likewise Exp $ */ /*-----------------------------------------------------------------------------------*/ @@ -482,8 +482,8 @@ struct udp_pcb * udp_new(void) { struct udp_pcb *pcb; pcb = memp_malloc(MEMP_UDP_PCB); - pcb->flags = 0; if(pcb != NULL) { + pcb->flags = 0; memset(pcb, 0, sizeof(struct udp_pcb)); return pcb; }