Re: [patch] ext4 crypto: testing the wrong variable

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

 



On Wed, Apr 08, 2015 at 01:51:08PM +0200, walter harms wrote:
> 
> 
> Am 08.04.2015 11:51, schrieb Julia Lawall:
> >>  void ext4_fname_crypto_free_buffer(void **buf)
> >>  {
> >> -	if (*buf == NULL || IS_ERR(buf))
> >> +	if (*buf == NULL || IS_ERR(*buf))
> > 
> > Why not use IS_ERR_OR_NULL?
> > 
> > julia
> 
> 
> why test *buf == NULL ? xfree() can handle this.
> 
> the question is do programm depend on *buf=NULL.
> In case of IS_ERR(*buf) *buf will be left unchanged
> and later prgramms may things there is a buffer
> available ?

Good point.  That IS_ERR() check is going to cause all kinds of future
bugs.

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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux