提交 2012a116 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

[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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 16a63173
......@@ -355,9 +355,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册