Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5693ce6f9b9f08942e55e3825db014f8b1205772
Commit:     5693ce6f9b9f08942e55e3825db014f8b1205772
Parent:     ac07860264bd2b18834d3fa3be47032115524cea
Author:     Cornelia Huck <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:32:26 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Fri Aug 10 14:32:36 2007 +0200

    [S390] cio: avoid memory leak on error in css_alloc_subchannel().
    
    sch->lock has been allocated in cio_validate_subchannel(), it must be
    freed if cio_modify() fails.
    
    Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 drivers/s390/cio/css.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 1c27a5a..5635e65 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -79,6 +79,7 @@ css_alloc_subchannel(struct subchannel_id schid)
        sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
        ret = cio_modify(sch);
        if (ret) {
+               kfree(sch->lock);
                kfree(sch);
                return ERR_PTR(ret);
        }
-
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