win32text: fix memleak
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 15 Sep 2009 15:40:11 +0000 (17:40 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Tue, 15 Sep 2009 15:40:11 +0000 (17:40 +0200)
modules/misc/win32text.c

index 9d0a0db..e8c4309 100644 (file)
@@ -370,6 +370,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
     if( !bitmap )
     {
         msg_Err( p_filter, "could not create bitmap" );
+        free( psz_string );
         return VLC_EGENERIC;
     }
 
@@ -388,6 +389,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     SelectObject( p_sys->hcdc, bitmap_bak );
     DeleteObject( bitmap );
+    free( psz_string );
     return VLC_SUCCESS;
 }