Commit dbcad1d8 authored by Damien Fouilleul's avatar Damien Fouilleul

freetype: balance vlc_object_find() and vlc_object_release(), otherwise object...

freetype: balance vlc_object_find() and vlc_object_release(), otherwise object is leaked (refcount > 0 on quit):
parent 1048cc3d
...@@ -519,7 +519,10 @@ static int LoadFontsFromAttachments( filter_t *p_filter ) ...@@ -519,7 +519,10 @@ static int LoadFontsFromAttachments( filter_t *p_filter )
return VLC_EGENERIC; return VLC_EGENERIC;
if( VLC_SUCCESS != input_Control( p_input, INPUT_GET_ATTACHMENTS, &pp_attachments, &i_attachments_cnt )) if( VLC_SUCCESS != input_Control( p_input, INPUT_GET_ATTACHMENTS, &pp_attachments, &i_attachments_cnt ))
{
vlc_object_release(p_input);
return VLC_EGENERIC; return VLC_EGENERIC;
}
p_sys->i_font_attachments = 0; p_sys->i_font_attachments = 0;
p_sys->pp_font_attachments = malloc( i_attachments_cnt * sizeof( input_attachment_t * )); p_sys->pp_font_attachments = malloc( i_attachments_cnt * sizeof( input_attachment_t * ));
...@@ -551,6 +554,8 @@ static int LoadFontsFromAttachments( filter_t *p_filter ) ...@@ -551,6 +554,8 @@ static int LoadFontsFromAttachments( filter_t *p_filter )
} }
free( pp_attachments ); free( pp_attachments );
vlc_object_release(p_input);
return rv; return rv;
} }
......
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