(extfs_done): fix possible NULL dereference.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2018-03-17 10:42:51 +03:00
parent b9ea1b2a21
commit 86e9d85f21

View File

@ -1687,6 +1687,9 @@ extfs_done (struct vfs_class *me)
ar = first_archive; ar = first_archive;
} }
if (extfs_plugins == NULL)
return;
for (i = 0; i < extfs_plugins->len; i++) for (i = 0; i < extfs_plugins->len; i++)
{ {
extfs_plugin_info_t *info; extfs_plugin_info_t *info;
@ -1696,8 +1699,7 @@ extfs_done (struct vfs_class *me)
g_free (info->prefix); g_free (info->prefix);
} }
if (extfs_plugins != NULL) g_array_free (extfs_plugins, TRUE);
g_array_free (extfs_plugins, TRUE);
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */