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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user