]> git.sesse.net Git - vlc/commitdiff
* [PATCH] Memory hole fix by Bernie Purcell
authorAntoine Cellerier <dionoea@videolan.org>
Thu, 26 Apr 2007 19:33:33 +0000 (19:33 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Thu, 26 Apr 2007 19:33:33 +0000 (19:33 +0000)
modules/misc/freetype.c
modules/misc/quartztext.c
src/video_output/vout_subpictures.c

index 7014c21049a10b9d4d8728bf1001152fccf2f3ef..77a2efb95ea0e19f0ce6188e1569052cc60cdc61 100644 (file)
@@ -1765,9 +1765,6 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
         }
         stream_Delete( p_sub );
     }
-    /* No longer need a HTML version of the text */
-    free( p_region_in->psz_html );
-    p_region_in->psz_html = NULL;
 
     return rv;
 }
index c41c984b897009116c5aa4a51ba9608ae909da81..379b9069c6e8fe31b3c29538099252c40a08a831 100644 (file)
@@ -710,9 +710,6 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
         }
         stream_Delete( p_sub );
     }
-    // No longer need a HTML version of the text
-    free( p_region_in->psz_html );
-    p_region_in->psz_html = NULL;
 
     return rv;
 }
index 02d0e06efd467e01381f24ee4089d9a0657cce52..b7a94ab5e132c1ab2ed6b877d1fa40780b595b86 100644 (file)
@@ -355,6 +355,8 @@ void __spu_DestroyRegion( vlc_object_t *p_this, subpicture_region_t *p_region )
 
     if( p_region->psz_text )
         free( p_region->psz_text );
+    if( p_region->psz_html )
+        free( p_region->psz_html );
     //free( p_region->p_style ); FIXME --fenrir plugin does not allocate the memory for it. I think it might lead to segfault, video renderer can live longer than the decoder
     free( p_region );
 }