Re: [PATCH] staging: ft1000: fix error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 26, 2010 at 12:59:55PM +0400, Vasiliy Kulikov wrote:
> +err_free:
> +	for (i--; i>=0; i--) {
> +		kfree(pdpram_blk->pbuffer);
> +		kfree(pdpram_blk);
> +	}

This is wrong.  I don't have linux-next so I can't see the context, why
are we looping here?  The second iteration through the loop will cause a
NULL dereference.

Also there should be spaces before and after the ">=".

regards,
dan carpenter

> +	return STATUS_FAILURE;
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux