]> git.hungrycats.org Git - linux/commitdiff
JFS: [CHECKER] Memory leak on commonly executed path
authorDave Kleikamp <shaggy@austin.ibm.com>
Thu, 20 May 2004 05:05:02 +0000 (00:05 -0500)
committerDave Kleikamp <shaggy@austin.ibm.com>
Thu, 20 May 2004 05:05:02 +0000 (00:05 -0500)
The jfs_log structure was never being freed at unmount time.

fs/jfs/jfs_logmgr.c

index 36fcfc4fbe08daa06359412737133d92a80f2a9e..f4ce4609c43b62dab27da2f664643d50a7f04d04 100644 (file)
@@ -1486,6 +1486,7 @@ int lmLogClose(struct super_block *sb)
                 *      in-line log in host file system
                 */
                rc = lmLogShutdown(log);
+               kfree(log);
                goto out;
        }
 
@@ -1515,6 +1516,8 @@ int lmLogClose(struct super_block *sb)
        bd_release(bdev);
        blkdev_put(bdev);
 
+       kfree(log);
+
       out:
        up(&jfs_log_sem);
        jfs_info("lmLogClose: exit(%d)", rc);