projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16a6317
)
[PATCH] drivers/infiniband/core/mad.c: fix use-after-release case
author
Adrian Bunk
<bunk@stusta.de>
Sat, 26 Nov 2005 23:37:36 +0000
(
00:37
+0100)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Mon, 28 Nov 2005 04:23:13 +0000
(20:23 -0800)
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>
drivers/infiniband/core/mad.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/core/mad.c
b/drivers/infiniband/core/mad.c
index
41d6b40
..
d393b50
100644
(file)
--- a/
drivers/infiniband/core/mad.c
+++ b/
drivers/infiniband/core/mad.c
@@
-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;
}