Fix possible crash.

This commit is contained in:
Pascal Obry
2015-04-15 11:48:50 +02:00
parent 08ce000401
commit 9e593fcb26
+2
View File
@@ -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;