text_style: fix use-after-free (cid #1313831)
authorTristan Matthews <tmatth@videolan.org>
Fri, 31 Jul 2015 09:28:03 +0000 (05:28 -0400)
committerTristan Matthews <tmatth@videolan.org>
Fri, 31 Jul 2015 09:28:03 +0000 (05:28 -0400)
src/misc/text_style.c

index 4dd27a3..82c9640 100644 (file)
@@ -127,8 +127,8 @@ void text_segment_Delete( text_segment_t* segment )
     if ( segment != NULL )
     {
         free( segment->psz_text );
-        free( segment );
         text_style_Delete( segment->style );
+        free( segment );
     }
 }