aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@zytor.com>2012-07-29 17:48:37 -0300
committerPaulo Alcantara <pcacjr@zytor.com>2012-07-29 17:48:37 -0300
commit27c574adbb9d64d94da06174c0c9bb6c88c7a1e2 (patch)
treeda697458e983a6e4594eff264a44c55eb9efdb01
parentb21c522d4f8fe94dd9ab9703fb0cb17da6b8a173 (diff)
downloadsyslinux-27c574adbb9d64d94da06174c0c9bb6c88c7a1e2.tar.gz
syslinux-27c574adbb9d64d94da06174c0c9bb6c88c7a1e2.tar.xz
syslinux-27c574adbb9d64d94da06174c0c9bb6c88c7a1e2.zip
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@zytor.com>
-rw-r--r--core/fs/xfs/xfs_dir2.c4
-rw-r--r--core/fs/xfs/xfs_readdir.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index 62743496..30db8cca 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 3767dd17..e68ce636 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;
}