Date: Tue, 19 Jul 2011 12:15:20 GMT From: Takuya ASADA <syuu@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 196397 for review Message-ID: <201107191215.p6JCFKSD080547@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@196397?ac=10 Change 196397 by syuu@kikurage on 2011/07/19 12:14:18 NULL check before free() Affected files ... .. //depot/projects/soc2011/mq_bpf/src/sys/net/bpf.c#14 edit Differences ... ==== //depot/projects/soc2011/mq_bpf/src/sys/net/bpf.c#14 (text+ko) ==== @@ -1568,8 +1568,11 @@ break; } d->bd_qmask.qm_enabled = FALSE; - free(d->bd_qmask.qm_rxq_mask, M_BPF); - free(d->bd_qmask.qm_txq_mask, M_BPF); + + if (d->bd_qmask.qm_rxq_mask != NULL) + free(d->bd_qmask.qm_rxq_mask, M_BPF); + if (d->bd_qmask.qm_txq_mask != NULL) + free(d->bd_qmask.qm_txq_mask, M_BPF); break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107191215.p6JCFKSD080547>