Commit 2a7cdd59 authored by Rémi Duraffort's avatar Rémi Duraffort

extension: fix a potential memleak.

parent cb91467d
......@@ -304,7 +304,10 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_filename,
/* Create new script descriptor */
extension_t *p_ext = ( extension_t* ) calloc( 1, sizeof( extension_t ) );
if( !p_ext )
{
free( psz_script );
return 0;
}
p_ext->psz_name = psz_script;
p_ext->p_sys = (extension_sys_t*) calloc( 1, sizeof( extension_sys_t ) );
......
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