mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
i2o message leak in i2o_msg_post_wait_mem()
We need to free i2o msg in case of error. Signed-off-by: Vasily Averin <vvs@sw.ru> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Acked-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
010904cbed
commit
3d0fd333a1
1 changed files with 3 additions and 1 deletions
|
@ -131,8 +131,10 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg,
|
|||
int rc = 0;
|
||||
|
||||
wait = i2o_exec_wait_alloc();
|
||||
if (!wait)
|
||||
if (!wait) {
|
||||
i2o_msg_nop(c, msg);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (tcntxt == 0xffffffff)
|
||||
tcntxt = 0x80000000;
|
||||
|
|
Loading…
Reference in a new issue