]> granicus.if.org Git - libass/commitdiff
Fix potential, small memory leak
authorGrigori Goronzy <greg@blackbox>
Thu, 29 Jul 2010 01:12:31 +0000 (03:12 +0200)
committerGrigori Goronzy <greg@blackbox>
Thu, 29 Jul 2010 01:14:09 +0000 (03:14 +0200)
Free clip vector drawing if multiple clip vectors appear in a single
line.  (In this case the last clip vector is used.)

libass/ass_parse.c

index 2fb33da5b652b76f95102036ebea685168746479..efc2aefa73b6b14baf40ba4236035281d4e5bb36 100644 (file)
@@ -216,6 +216,7 @@ static char *parse_vector_clip(ASS_Renderer *render_priv, char *p)
     int res = 0;
     ASS_Drawing *drawing;
 
+    ass_drawing_free(render_priv->state.clip_drawing);
     render_priv->state.clip_drawing = ass_drawing_new(
         render_priv->fontconfig_priv,
         render_priv->state.font,