File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -714,14 +714,22 @@ static void ThreadChangeFilters(vout_thread_t *vout,
714
714
char * next = config_ChainCreate (& name , & cfg , current );
715
715
716
716
if (name && * name ) {
717
- vout_filter_t * e = xmalloc (sizeof (* e ));
718
- e -> name = name ;
719
- e -> cfg = cfg ;
720
- if (!strcmp (e -> name , "deinterlace" ) ||
721
- !strcmp (e -> name , "postproc" )) {
722
- vlc_array_append (& array_static , e );
723
- } else {
724
- vlc_array_append (& array_interactive , e );
717
+ vout_filter_t * e = malloc (sizeof (* e ));
718
+
719
+ if (e ) {
720
+ e -> name = name ;
721
+ e -> cfg = cfg ;
722
+ if (!strcmp (e -> name , "deinterlace" ) ||
723
+ !strcmp (e -> name , "postproc" )) {
724
+ vlc_array_append (& array_static , e );
725
+ } else {
726
+ vlc_array_append (& array_interactive , e );
727
+ }
728
+ }
729
+ else {
730
+ if (cfg )
731
+ config_ChainDestroy (cfg );
732
+ free (name );
725
733
}
726
734
} else {
727
735
if (cfg )
You can’t perform that action at this time.
0 commit comments