Thread (4 messages) flat view 4 messages, 3 authors, 2005-03-17

Re: [PATCH] net, ipv6: remove redundant NULL checks before kfree in ip6_flowlabel.c

From: Jesper Juhl <hidden>
Date: 2005-03-17 06:21:01

On Thu, 17 Mar 2005, YOSHIFUJI Hideaki / [iso-2022-jp] µÈÆ£±ÑÌÀ wrote:
In article [ref] (at Thu, 17 Mar 2005 00:36:35 +0100 (CET)), Jesper Juhl [off-list ref] says:
quoted
I considered also rewriting the 
        if (fl)
                fl_free(fl);
bit as simply fl_free(fl) as well, but that if() potentially saves two 
calls to kfree() inside fl_free as well as the call to fl_free itself, so 
I guess that's worth the if().
I don't mind calling kfree twice itself (because that function is not
so performance critical), but fl_free(NULL) is out because
if fl is NULL, kfree(fl->opt) is out.
Yes, you are right ofcourse. 
Thanks.

-- 
Jesper
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help