diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-04-20 05:12:54 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-04-20 05:12:54 +0000 |
commit | 17fde132b65e0a0c3365fed402c6ed47b84f147e (patch) | |
tree | 796f2837171dbb97688c8e8da20c12607d978a67 /sys/dev | |
parent | f49e46301bf3d9f4f0e996f82f92cb65c9fc7f3c (diff) | |
download | FreeBSD-src-17fde132b65e0a0c3365fed402c6ed47b84f147e.zip FreeBSD-src-17fde132b65e0a0c3365fed402c6ed47b84f147e.tar.gz |
Eliminate CID 1842 by comparing against (type != EXT_MBUF) => refcnt != NULL
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgb/sys/uipc_mvec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/cxgb/sys/uipc_mvec.c b/sys/dev/cxgb/sys/uipc_mvec.c index bbe6b76..87d21ae 100644 --- a/sys/dev/cxgb/sys/uipc_mvec.c +++ b/sys/dev/cxgb/sys/uipc_mvec.c @@ -348,7 +348,8 @@ mb_free_vec(struct mbuf *m) int type = mbuf_vec_get_type(mv, i); void *cl = mv->mv_vec[i].mi_base; - if (refcnt && *refcnt != 1 && atomic_fetchadd_int(refcnt, -1) != 1) + if ((type != EXT_MBUF) && *refcnt != 1 && + atomic_fetchadd_int(refcnt, -1) != 1) continue; DPRINTF("freeing idx=%d refcnt=%p type=%d cl=%p\n", i, refcnt, type, cl); |