Fix a possible mem leak in case of error.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2010-04-12 00:05:40 +00:00
parent e9024a3be5
commit e16c15a7e7
@@ -398,7 +398,6 @@ fs_walk(fs_volume *_vol, fs_vnode *_dir, const char *file, ino_t *vnid)
ERRPRINT("fs_walk - VNID = %d\n",*vnid);
ntfs_inode_close(bi);
free(unicode);
if (*vnid == (u64)-1) {
result = EINVAL;
@@ -415,6 +414,9 @@ fs_walk(fs_volume *_vol, fs_vnode *_dir, const char *file, ino_t *vnid)
exit:
ERRPRINT("fs_walk - EXIT, result is %s\n", strerror(result));
if (unicode)
free(unicode);
UNLOCK_VOL(ns);
return result;