1
0
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:
Martine Lenders 2017-06-14 13:58:24 +02:00
parent f142908f4e
commit f8c2078f94
No known key found for this signature in database
GPG Key ID: 8E97A9FE55F25D62

View File

@ -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 */