Permalink
Browse files

Fix memory leak on opendir error

  • Loading branch information...
tsavola authored and Nikratio committed Oct 12, 2017
1 parent 608e7ab commit 2731a001e5bdce7409550e4c1ce78ff1dfb96a88
Showing with 2 additions and 1 deletion.
  1. +2 −1 sshfs.c
View
@@ -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;
}

0 comments on commit 2731a00

Please sign in to comment.