Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Adrian Bunk and committed by
Linus Torvalds
2012a116 16a63173

+2 -2
+2 -2
drivers/infiniband/core/mad.c
··· 355 355 spin_unlock_irqrestore(&port_priv->reg_lock, flags); 356 356 kfree(reg_req); 357 357 error3: 358 - kfree(mad_agent_priv); 359 - error2: 360 358 ib_dereg_mr(mad_agent_priv->agent.mr); 359 + error2: 360 + kfree(mad_agent_priv); 361 361 error1: 362 362 return ret; 363 363 }