mirror of https://github.com/MidnightCommander/mc
fix VFS crashes.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
7cfaeca063
commit
a3344024c1
|
@ -1166,8 +1166,12 @@ vfs_s_open (struct vfs_class *me, const char *file, int flags, mode_t mode)
|
|||
}
|
||||
|
||||
split_dir_name (me, q, &dirname, &name, &save);
|
||||
/* FIXME: check if vfs_s_find_inode returns NULL */
|
||||
dir = vfs_s_find_inode (me, super, dirname, LINK_FOLLOW, FL_DIR);
|
||||
if (dir == NULL)
|
||||
{
|
||||
g_free (q);
|
||||
return NULL;
|
||||
}
|
||||
if (save)
|
||||
*save = PATH_SEP;
|
||||
ent = vfs_s_generate_entry (me, name, dir, 0755);
|
||||
|
|
|
@ -222,7 +222,7 @@ vfs_stamp_create (struct vfs_class *oldvfs, vfsid oldvfsid)
|
|||
n3vfsid = NULL;
|
||||
}
|
||||
|
||||
if (!oldvfs->nothingisopen || !(*oldvfs->nothingisopen) (oldvfsid))
|
||||
if (!oldvfs || !oldvfs->nothingisopen || !(*oldvfs->nothingisopen) (oldvfsid))
|
||||
return;
|
||||
|
||||
vfs_addstamp (oldvfs, oldvfsid);
|
||||
|
|
Loading…
Reference in New Issue