i2o message leak in i2o_msg_post_wait_mem()

We need to free i2o msg in case of error.

Signed-off-by: Vasily Averin <[email protected]>
Acked-by: Alan Cox <[email protected]>
Cc: Markus Lidel <[email protected]>
Acked-by: Kirill Korotaev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Vasily Averin 2007-07-17 04:04:26 -07:00 • committed by Linus Torvalds
commit 3d0fd333a1

View file

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