changeset 28715:d609e9b8732d

Fix memory leak produced by the \blur patch. Patch by Grigori G (greg chown ath cx).
author eugeni
date Fri, 27 Feb 2009 23:06:40 +0000
parents aa85da6fb408
children 0a8b23440a61
files libass/ass_bitmap.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_bitmap.c	Fri Feb 27 23:06:37 2009 +0000
+++ b/libass/ass_bitmap.c	Fri Feb 27 23:06:40 2009 +0000
@@ -62,8 +62,8 @@
 	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;
 		}