Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d0fd333a1c2659fb0495894090d1146b239fd9a
Commit:     3d0fd333a1c2659fb0495894090d1146b239fd9a
Parent:     010904cbed3db3464213fbc602802cc6f53e56e1
Author:     Vasily Averin <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 04:04:26 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 10:23:06 2007 -0700

    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]>
---
 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 c13b932..809d4b6 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to