Mercurial > mplayer.hg
diff libass/ass_bitmap.c @ 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 | e0d57dc91df9 |
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; }