Re: [PATCH] don't do pointless NULL checks and casts before kfree() in security/

From: Bodo Eggert
Date: Sun Mar 20 2005 - 08:16:07 EST


Ralph Corderoy <ralph@xxxxxxxxxxxxxxx> wrote:
> Hi Jesper,

>> kfree() handles NULL pointers, so checking a pointer for NULL before
>> calling kfree() on it is pointless.
>
> Not necessarily. It helps tell the reader that the pointer may be NULL
> at that point. This has come up before.

If you want to comment code, use comments.
-
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/