From 6a85784c7ccddd792117212c4bccf24d04a6cb20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 30 Apr 2009 10:16:45 +0200 Subject: [PATCH] lame/lamemp3enc: Fix memory leak on FLUSH_STOP --- ext/lame/gstlame.c | 1 + ext/lame/gstlamemp3enc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c index e57899e3ad..8c136de098 100644 --- a/ext/lame/gstlame.c +++ b/ext/lame/gstlame.c @@ -1023,6 +1023,7 @@ gst_lame_sink_event (GstPad * pad, GstEvent * event) mp3_buffer_size = 7200; mp3_data = g_malloc (mp3_buffer_size); lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size); + g_free (mp3_data); ret = gst_pad_push_event (lame->srcpad, event); break; diff --git a/ext/lame/gstlamemp3enc.c b/ext/lame/gstlamemp3enc.c index 07cb8b41b9..32a1a634dd 100644 --- a/ext/lame/gstlamemp3enc.c +++ b/ext/lame/gstlamemp3enc.c @@ -587,6 +587,7 @@ gst_lamemp3enc_sink_event (GstPad * pad, GstEvent * event) mp3_buffer_size = 7200; mp3_data = g_malloc (mp3_buffer_size); lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size); + g_free (mp3_data); ret = gst_pad_push_event (lame->srcpad, event); break;