From e2cf25d5c541342af2b4722226cab2b909a593e6 Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Tue, 23 Apr 2002 13:14:34 +0000 Subject: Fix osd memory leaks (unprocessed events and unfreed overlay objects) CVS patchset: 1761 CVS date: 2002/04/23 13:14:34 --- src/xine-engine/video_overlay.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c index a51f3cd85..c710f1d14 100644 --- a/src/xine-engine/video_overlay.c +++ b/src/xine-engine/video_overlay.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_overlay.c,v 1.19 2002/04/09 13:20:43 jcdutton Exp $ + * $Id: video_overlay.c,v 1.20 2002/04/23 13:14:34 esnel Exp $ * */ @@ -597,10 +597,23 @@ static void video_overlay_dispose(video_overlay_instance_t *this_gen) { for (i=0; i < MAX_EVENTS; i++) { if (this->video_overlay_events[i].event != NULL) { + if (this->video_overlay_events[i].event->object.overlay != NULL) { + if (this->video_overlay_events[i].event->object.overlay->rle) + free (this->video_overlay_events[i].event->object.overlay->rle); + free (this->video_overlay_events[i].event->object.overlay); + } free (this->video_overlay_events[i].event); } } + for (i=0; i < MAX_OBJECTS; i++) { + if (this->video_overlay_objects[i].overlay != NULL) { + if (this->video_overlay_objects[i].overlay->rle) + free (this->video_overlay_objects[i].overlay->rle); + free (this->video_overlay_objects[i].overlay); + } + } + free (this); } -- cgit v1.2.3