forked from Minki/linux
[PATCH] drivers/infiniband/core/mad.c: fix use-after-release case
The Coverity checker spotted this obvious use-after-release bug caused by a wrong order of the cleanups. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
16a6317331
commit
2012a116d9
@ -355,9 +355,9 @@ error4:
|
||||
spin_unlock_irqrestore(&port_priv->reg_lock, flags);
|
||||
kfree(reg_req);
|
||||
error3:
|
||||
kfree(mad_agent_priv);
|
||||
error2:
|
||||
ib_dereg_mr(mad_agent_priv->agent.mr);
|
||||
error2:
|
||||
kfree(mad_agent_priv);
|
||||
error1:
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user