Messages in this thread |  | | Date | Sat, 26 Aug 2000 20:23:30 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] tty_io.c: s/suser/capable/, check get_user |
| |
On Sat, 26 Aug 2000, Arnaldo Carvalho de Melo wrote: > > Please consider applying. Also an RFC: is it ok to do a kfree > without checking if it is NULL in case of error handling? By looking > at the code it is safe and becomes mostly a no op, but it is ok to > do it this way?
It should be ok - if kfree() has problems with a NULL pointer that is a bug in kfree. Basically, I'd like the kernel kmalloc/kfree to look as much as possible as the user ones (apart, obviously, from the kernel-forced stuff like the memory allocation attribute). And malloc/free allow NULL pointers - it would be a nasty surprise to people who are used to that if the kmalloc/kfree thing behaved differently.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |