mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
gnrc_pktbuf_static: assert that users > 0 on release
This commit is contained in:
parent
f142908f4e
commit
f8c2078f94
@ -227,6 +227,7 @@ static void _release_error_locked(gnrc_pktsnip_t *pkt, uint32_t err)
|
||||
while (pkt) {
|
||||
gnrc_pktsnip_t *tmp;
|
||||
assert(_pktbuf_contains(pkt));
|
||||
assert(pkt->users > 0);
|
||||
tmp = pkt->next;
|
||||
if (pkt->users == 1) {
|
||||
pkt->users = 0; /* not necessary but to be on the safe side */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user