mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Fixed assignment of pcb->flags if pcb was NULL in udp_new().
This commit is contained in:
parent
ba666295eb
commit
0e4d59541a
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $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) {
|
udp_new(void) {
|
||||||
struct udp_pcb *pcb;
|
struct udp_pcb *pcb;
|
||||||
pcb = memp_malloc(MEMP_UDP_PCB);
|
pcb = memp_malloc(MEMP_UDP_PCB);
|
||||||
pcb->flags = 0;
|
|
||||||
if(pcb != NULL) {
|
if(pcb != NULL) {
|
||||||
|
pcb->flags = 0;
|
||||||
memset(pcb, 0, sizeof(struct udp_pcb));
|
memset(pcb, 0, sizeof(struct udp_pcb));
|
||||||
return pcb;
|
return pcb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user