diff options
author | Vasily Averin <vvs@sw.ru> | 2007-07-17 04:04:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 10:23:06 -0700 |
commit | 3d0fd333a1c2659fb0495894090d1146b239fd9a (patch) | |
tree | e282a0181c660ede2407b0e4d0dfc1b1d306e0ae /drivers/message/i2o | |
parent | 010904cbed3db3464213fbc602802cc6f53e56e1 (diff) | |
download | linux-3.10-3d0fd333a1c2659fb0495894090d1146b239fd9a.tar.gz linux-3.10-3d0fd333a1c2659fb0495894090d1146b239fd9a.tar.bz2 linux-3.10-3d0fd333a1c2659fb0495894090d1146b239fd9a.zip |
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>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |