[Ocfs2-commits] manish commits r2507 - branches/ocfs2-1.0/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Aug 11 20:40:47 CDT 2005
Author: manish
Signed-off-by: mfasheh
Date: 2005-08-11 20:40:47 -0500 (Thu, 11 Aug 2005)
New Revision: 2507
Modified:
branches/ocfs2-1.0/fs/ocfs2/symlink.c
Log:
Fix follow_link error case, and free the new_link memory on exit.
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.0/fs/ocfs2/symlink.c
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/symlink.c 2005-08-12 01:13:12 UTC (rev 2506)
+++ branches/ocfs2-1.0/fs/ocfs2/symlink.c 2005-08-12 01:40:47 UTC (rev 2507)
@@ -295,11 +295,12 @@
len = ocfs2_link_size(symlink_ops, orig_link, inode);
new_link = kmalloc(len, GFP_KERNEL);
if (new_link == NULL) {
- res = ENOMEM;
+ res = -ENOMEM;
goto out;
}
ocfs2_link_expand(symlink_ops, new_link, orig_link, inode);
res = vfs_follow_link(nd, new_link);
+ kfree(new_link);
out:
if (page) {
kunmap(page);
More information about the Ocfs2-commits
mailing list