[syslinux:elflink] xfs: Fix memory leak in xfs_dir2_node_find_entry() function
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue Nov 27 12:57:23 PST 2012
Commit-ID: 27c574adbb9d64d94da06174c0c9bb6c88c7a1e2
Gitweb: http://www.syslinux.org/commit/27c574adbb9d64d94da06174c0c9bb6c88c7a1e2
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Sun, 29 Jul 2012 17:48:37 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sun, 29 Jul 2012 17:48:37 -0300
xfs: Fix memory leak in xfs_dir2_node_find_entry() function
If xfs_dir2_node_find_entry() wasn't able to find a data block, the leaf
pointer were not being freed through the label "out", so we must use the
label "out1" instead.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs_dir2.c | 4 ++--
core/fs/xfs/xfs_readdir.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index 6274349..30db8cc 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -592,8 +592,8 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent,
fsblkno = xfs_dir2_get_right_blk(parent->fs, core, 0, node_off,
newdb, &error);
if (error) {
- xfs_error("Cannot find data rec!");
- goto out;
+ xfs_error("Cannot find data block!");
+ goto out1;
}
buf = xfs_dir2_get_dirblks(parent->fs, fsblkno, 1);
diff --git a/core/fs/xfs/xfs_readdir.c b/core/fs/xfs/xfs_readdir.c
index 3767dd1..e68ce63 100644
--- a/core/fs/xfs/xfs_readdir.c
+++ b/core/fs/xfs/xfs_readdir.c
@@ -357,7 +357,7 @@ try_next_btree:
fsblkno = xfs_dir2_get_right_blk(fs, core, 0, node_off, db, &error);
if (error) {
- xfs_error("Cannot find data rec!");
+ xfs_error("Cannot find data block!");
goto out1;
}
More information about the Syslinux-commits
mailing list