aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-11-26 18:37:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-27 23:23:13 -0500
commit2012a116d9e6803fb072d0cfe1aae0cc4e6d6416 (patch)
treebb9d851ae660c92edb710909746eb414c8d586e0 /drivers
parent16a631733135a625dd8bc83207553aaf34c0a72c (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/mad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 41d6b4017acb..d393b504bf26 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -355,9 +355,9 @@ error4:
355 spin_unlock_irqrestore(&port_priv->reg_lock, flags); 355 spin_unlock_irqrestore(&port_priv->reg_lock, flags);
356 kfree(reg_req); 356 kfree(reg_req);
357error3: 357error3:
358 kfree(mad_agent_priv);
359error2:
360 ib_dereg_mr(mad_agent_priv->agent.mr); 358 ib_dereg_mr(mad_agent_priv->agent.mr);
359error2:
360 kfree(mad_agent_priv);
361error1: 361error1:
362 return ret; 362 return ret;
363} 363}