Re: [PATCH 01/14] Big kfree NULL check cleanup - net

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

 



In article <[email protected]> (at Thu, 13 Oct 2005 21:25:43 +0200), Jesper Juhl <[email protected]> says:

> --- linux-2.6.14-rc4-orig/net/ipv4/netfilter/ip_nat_snmp_basic.c	2005-10-11 22:41:33.000000000 +0200
> +++ linux-2.6.14-rc4/net/ipv4/netfilter/ip_nat_snmp_basic.c	2005-10-13 11:31:09.000000000 +0200
> @@ -1161,8 +1161,7 @@ static int snmp_parse_mangle(unsigned ch
>  		
>  		if (!snmp_object_decode(&ctx, obj)) {
>  			if (*obj) {
> -				if ((*obj)->id)
> -					kfree((*obj)->id);
> +				kfree((*obj)->id);
>  				kfree(*obj);
>  			}	
>  			kfree(obj);

Maybe:
    if (*obj)
        kfree((*obj)->id);
    kfree(obj);

Otherwise;
Acked-by: YOSHIFUJI Hideaki <[email protected]>

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux