From 3d0fd333a1c2659fb0495894090d1146b239fd9a Mon Sep 17 00:00:00 2001 From: Vasily Averin Date: Tue, 17 Jul 2007 04:04:26 -0700 Subject: [PATCH] i2o message leak in i2o_msg_post_wait_mem() We need to free i2o msg in case of error. Signed-off-by: Vasily Averin Acked-by: Alan Cox Cc: Markus Lidel Acked-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/message/i2o/exec-osm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index c13b9321e7a..809d4b63c0b 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c @@ -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; -- 2.41.1