Fix memory leak on opendir error

This commit is contained in:
Timo Savola 2017-10-12 20:51:25 +03:00 committed by Nikolaus Rath
parent 608e7ab89c
commit 2731a001e5
1 changed files with 2 additions and 1 deletions

View File

@ -2152,7 +2152,8 @@ static int sshfs_opendir(const char *path, struct fuse_file_info *fi)
if (!err) {
buf_finish(handle);
fi->fh = (unsigned long) handle;
}
} else
free(handle);
buf_free(&buf);
return err;
}