Commit 4dc5e6b3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

cache: missing error handling and leak on error

parent ccc530cd
......@@ -217,6 +217,8 @@ error:
static module_t *CacheLoadModule (FILE *file)
{
module_t *module = vlc_module_create (NULL);
if (unlikely(module == NULL))
return NULL;
/* Load additional infos */
LOAD_STRING(module->psz_shortname);
......@@ -274,7 +276,8 @@ static module_t *CacheLoadModule (FILE *file)
return module;
error:
return NULL; /* FIXME: leaks */
vlc_module_destroy(module);
return NULL;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment