]> err.no Git - linux-2.6/commitdiff
i2o message leak in i2o_msg_post_wait_mem()
authorVasily Averin <vvs@sw.ru>
Tue, 17 Jul 2007 11:04:26 +0000 (04:04 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:06 +0000 (10:23 -0700)
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>
drivers/message/i2o/exec-osm.c

index c13b9321e7ab115a242e22f5c607bc84b715f9d4..809d4b63c0b303842b81a6b881e9d7ffc104ee5d 100644 (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;