Author: emaste Date: Wed Oct 17 18:21:14 2012 New Revision: 241643 URL: http://svn.freebsd.org/changeset/base/241643
Log: Avoid panic when a netmap instance cannot obtain memory. A uint32_t is always >= 0. Sponsored by: ADARA Networks Modified: head/sys/dev/netmap/netmap_mem2.c Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Wed Oct 17 16:37:16 2012 (r241642) +++ head/sys/dev/netmap/netmap_mem2.c Wed Oct 17 18:21:14 2012 (r241643) @@ -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); } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"