Avoid panic when a netmap instance cannot obtain memory.

A uint32_t is always >= 0.

Sponsored by: ADARA Networks
This commit is contained in:
emaste 2012-10-17 18:21:14 +00:00
parent 57b3e442e2
commit b993898a36

View File

@ -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);
}
}