[MPlayer-cvslog] r28750 - trunk/libass/ass_bitmap.c

eugeni subversion at mplayerhq.hu
Sat Feb 28 00:06:40 CET 2009


Author: eugeni
Date: Sat Feb 28 00:06:40 2009
New Revision: 28750

Log:
Fix memory leak produced by the \blur patch.

Patch by Grigori G (greg chown ath cx).

Modified:
   trunk/libass/ass_bitmap.c

Modified: trunk/libass/ass_bitmap.c
==============================================================================
--- trunk/libass/ass_bitmap.c	Sat Feb 28 00:06:37 2009	(r28749)
+++ trunk/libass/ass_bitmap.c	Sat Feb 28 00:06:40 2009	(r28750)
@@ -62,8 +62,8 @@ static int generate_tables(ass_synth_pri
 	priv->g_w = 2*priv->g_r+1;
 
 	if (priv->g_r) {
-		priv->g = malloc(priv->g_w * sizeof(unsigned));
-		priv->gt2 = malloc(256 * priv->g_w * sizeof(unsigned));
+		priv->g = realloc(priv->g, priv->g_w * sizeof(unsigned));
+		priv->gt2 = realloc(priv->gt2, 256 * priv->g_w * sizeof(unsigned));
 		if (priv->g==NULL || priv->gt2==NULL) {
 			return -1;
 		}



More information about the MPlayer-cvslog mailing list