mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 02:39:15 +00:00
Set q to NULL after freeing it before returning: cleaner code!
This commit is contained in:
parent
9209a2ee33
commit
3a429eabcd
@ -378,6 +378,7 @@ udp_send(struct udp_pcb *pcb, struct pbuf *p)
|
||||
if (q != p) {
|
||||
/* free the header pbuf */
|
||||
pbuf_free(q);
|
||||
q = NULL;
|
||||
/* p is still referenced by the caller, and will live on */
|
||||
}
|
||||
return ERR_VAL;
|
||||
|
Loading…
Reference in New Issue
Block a user