Commit 3d0fd333 authored by Vasily Averin's avatar Vasily Averin Committed by Linus Torvalds

i2o message leak in i2o_msg_post_wait_mem()

We need to free i2o msg in case of error.
Signed-off-by: default avatarVasily Averin <vvs@sw.ru>
Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Acked-by: default avatarKirill Korotaev <dev@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 010904cb
...@@ -131,8 +131,10 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg, ...@@ -131,8 +131,10 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg,
int rc = 0; int rc = 0;
wait = i2o_exec_wait_alloc(); wait = i2o_exec_wait_alloc();
if (!wait) if (!wait) {
i2o_msg_nop(c, msg);
return -ENOMEM; return -ENOMEM;
}
if (tcntxt == 0xffffffff) if (tcntxt == 0xffffffff)
tcntxt = 0x80000000; tcntxt = 0x80000000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment