mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Fix memory leak produced by the \blur patch.
Patch by Grigori G (greg chown ath cx). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28750 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b84c1b627f
commit
bcad979a56
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user