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:
Vasily Averin 2007-07-17 04:04:26 -07:00 committed by Linus Torvalds
parent 010904cbed
commit 3d0fd333a1
1 changed files with 3 additions and 1 deletions

View File

@ -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;