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
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue