PERFORCE change 111526 for review

Bernd Walter ticso at cicely12.cicely.de
Tue Dec 12 04:41:40 PST 2006


On Tue, Dec 12, 2006 at 03:28:31AM +0000, Warner Losh wrote:
> http://perforce.freebsd.org/chv.cgi?CH=111526
> 
> Change 111526 by imp at imp_lighthouse on 2006/12/12 03:27:31
> 
> 	Don't leak a lock on an invalid transfer.

Ups...

> 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

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the p4-projects mailing list