diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-11-27 00:37:36 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-27 20:23:13 -0800 |
commit | 2012a116d9e6803fb072d0cfe1aae0cc4e6d6416 (patch) | |
tree | bb9d851ae660c92edb710909746eb414c8d586e0 /drivers/infiniband/core | |
parent | 16a631733135a625dd8bc83207553aaf34c0a72c (diff) | |
download | kernel_samsung_aries-2012a116d9e6803fb072d0cfe1aae0cc4e6d6416.zip kernel_samsung_aries-2012a116d9e6803fb072d0cfe1aae0cc4e6d6416.tar.gz kernel_samsung_aries-2012a116d9e6803fb072d0cfe1aae0cc4e6d6416.tar.bz2 |
[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/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/mad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 41d6b40..d393b50 100644 --- 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; } |