]> granicus.if.org Git - libass/commitdiff
Fix memory leak produced by the \blur patch.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 27 Feb 2009 23:06:40 +0000 (23:06 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 27 Feb 2009 23:06:40 +0000 (23:06 +0000)
Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28750 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_bitmap.c

index d6d750631d82d830e258c3e936278f92aed3cf26..9ccb1bada91e208da7b356b2aa9382278178a051 100644 (file)
@@ -62,8 +62,8 @@ static int generate_tables(ass_synth_priv_t* priv, double radius)
        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;
                }