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

From: Ralph Corderoy
Date: Sun Mar 20 2005 - 07:51:50 EST



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.

http://groups-beta.google.com/group/linux.kernel/browse_thread/thread/bd3d6e5a29e43c73/7b43819f874295e8?q=ralph@xxxxxxxxxxxxxxx+persuade+lkml#7b43819f874295e8

Cheers,


Ralph.

-
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/