Avoid panic when a netmap instance cannot obtain memory.
A uint32_t is always >= 0. Sponsored by: ADARA Networks
This commit is contained in:
parent
57b3e442e2
commit
b993898a36
@ -325,7 +325,8 @@ netmap_new_bufs(struct netmap_if *nifp,
|
||||
return;
|
||||
|
||||
cleanup:
|
||||
for (i--; i >= 0; i--) {
|
||||
while (i > 0) {
|
||||
i--;
|
||||
netmap_obj_free(nm_mem->nm_buf_pool, slot[i].buf_idx);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user