mirror of
https://github.com/TurboGit/hubicfuse.git
synced 2026-08-02 02:42:00 +02:00
Fix possible crash.
This commit is contained in:
@@ -376,6 +376,8 @@ static int cfs_open(const char *path, struct fuse_file_info *info)
|
||||
|
||||
openfile *of = (openfile *)malloc(sizeof(openfile));
|
||||
of->fd = dup(fileno(temp_file));
|
||||
if (of->fd == -1)
|
||||
return -ENOENT;
|
||||
fclose(temp_file);
|
||||
of->flags = info->flags;
|
||||
info->fh = (uintptr_t)of;
|
||||
|
||||
Reference in New Issue
Block a user