diff --git a/ChangeLog b/ChangeLog index b525b97c05..2a84ca5b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-25 David Schleef + + * ext/cairo/gsttextoverlay.c: Fix obvious memleak. + 2008-08-25 Edward Hervey * gst/matroska/matroska-demux.c: (gst_matroska_demux_send_event), diff --git a/ext/cairo/gsttextoverlay.c b/ext/cairo/gsttextoverlay.c index 74fc775516..c96f22bfa0 100644 --- a/ext/cairo/gsttextoverlay.c +++ b/ext/cairo/gsttextoverlay.c @@ -410,8 +410,6 @@ gst_text_overlay_render_text (GstCairoTextOverlay * overlay, if (textlen < 0) textlen = strlen (text); - string = g_strndup (text, textlen); - if (overlay->need_render) { GST_DEBUG ("Rendering text '%s' on cairo RGBA surface", string); } else { @@ -421,6 +419,8 @@ gst_text_overlay_render_text (GstCairoTextOverlay * overlay, return; } + string = g_strndup (text, textlen); + overlay->text_fill_image = g_realloc (overlay->text_fill_image, 4 * overlay->width * overlay->font_height);