mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-28 23:00:50 +00:00
pbuf_ref: assert-check for 'ref' overflow
(cherry picked from commit 76763c9bcd
)
This commit is contained in:
parent
e318688195
commit
8849a443a4
@ -822,6 +822,7 @@ pbuf_ref(struct pbuf *p)
|
|||||||
/* pbuf given? */
|
/* pbuf given? */
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
SYS_ARCH_INC(p->ref, 1);
|
SYS_ARCH_INC(p->ref, 1);
|
||||||
|
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user