Thread (6 messages) flat view 6 messages, 5 authors, 2012-09-13

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: 2012-09-13 09:27:53
Also in: kernel-janitors, lkml

Seems to me that (assuming kfree(NULL) is ok) the kfree()
is best left in - just in case some other error path is
added after drv->cs is assigned.
Better safe than a memory leak.
I'm not sure if I got your point. Now the label "error:" is only
reached if drv->cs is NULL. There is not other way to move to error:
unless drv->cs is NULL. Why wouldn't be safe to remove the
kfree(drv->cs) when drv->cs is NULL?


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