Messages in this thread | | | Date | Fri, 14 Mar 2003 11:04:21 +0300 | From | Oleg Drokin <> | Subject | Re: [2.4] init/do_mounts.c::rd_load_image() memleak |
| |
Hello!
On Fri, Mar 14, 2003 at 08:59:57AM +0100, Jens Axboe wrote:
> > > > + if (buf) > > > > + kfree(buf); > > > kfree(NULL); is valid - you don't need this check. > > Almost every place I can think of does just this, so I do not see why this > > particular piece of code should be different. > Since when has that been a valid argument? :)
Well, my argument is code uniformness which was always valid as long as it does not introduce any bugs, I think. Do you propose somebody should go and fix all if ( something ) kfree(something); pieces of code to read just kfree(something); ?
Bye, Oleg - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |