Date: Tue, 12 Dec 2006 03:28:31 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111526 for review Message-ID: <200612120328.kBC3SVQX086559@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111526 Change 111526 by imp@imp_lighthouse on 2006/12/12 03:27:31 Don't leak a lock on an invalid transfer. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_twi.c#39 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_twi.c#39 (text+ko) ==== @@ -321,8 +321,10 @@ len = msgs[i].len; buf = msgs[i].buf; /* zero byte transfers aren't allowed */ - if (len == 0 || buf == NULL) - return (EINVAL); + if (len == 0 || buf == NULL) { + err = EINVAL; + goto out; + } if (len == 1) WR4(sc, TWI_CR, TWI_CR_START | TWI_CR_STOP); else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612120328.kBC3SVQX086559>