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

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Fri Oct 14 2005 - 07:51:36 EST


In article <200510132125.44470.jesper.juhl@xxxxxxxxx> (at Thu, 13 Oct 2005 21:25:43 +0200), Jesper Juhl <jesper.juhl@xxxxxxxxx> 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 <yoshfuji@xxxxxxxxxxxxxx>

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