mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(mc_closedir): fix NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
a9e5957196
commit
623015eb0d
@ -515,10 +515,15 @@ mc_readdir (DIR * dirp)
|
||||
int
|
||||
mc_closedir (DIR * dirp)
|
||||
{
|
||||
int handle = *(int *) dirp;
|
||||
int handle;
|
||||
struct vfs_class *vfs;
|
||||
int result = -1;
|
||||
|
||||
if (dirp == NULL)
|
||||
return result;
|
||||
|
||||
handle = *(int *) dirp;
|
||||
|
||||
vfs = vfs_class_find_by_handle (handle);
|
||||
if (vfs != NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user