From: John Ellis Date: Thu, 30 Nov 2006 14:58:27 +0000 (+0000) Subject: Thu Nov 30 09:55:42 2006 John Ellis X-Git-Tag: v1.0.0~1684 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=31c7291dafdcef141e1aaf70817ea2715a3c103b Thu Nov 30 09:55:42 2006 John Ellis * slideshow.c (real_slideshow_start): Fix memory leak when unable to begin a slideshow. --- diff --git a/ChangeLog b/ChangeLog index feb4929e..fd3bf1d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 30 09:55:42 2006 John Ellis + + * slideshow.c (real_slideshow_start): Fix memory leak when unable to + begin a slideshow. + Wed Nov 29 22:53:03 2006 John Ellis * image-overlay.[ch]: Prepare for icon notification display, and fix diff --git a/TODO b/TODO index b9c4627a..c96b27b8 100644 --- a/TODO +++ b/TODO @@ -117,7 +117,9 @@ d> figure out if crash when expanding a folder in the folder tree view when pess Minor (non blockers): ---------------------------------------------- - > fix gtk_table_attach use to not use FALSE for fill vertical arg. +d> fix memory leak in real_slideshow_start() when slideshow_step fails. + +d> fix gtk_table_attach use to not use FALSE for fill vertical arg. > xv and xpaint are hardly used or even installed by any distro anymore - time to remove these (and find alternates?) seems silly to only have gimp. diff --git a/src/slideshow.c b/src/slideshow.c index ab25ce6d..2e6a6e74 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -336,11 +336,9 @@ static SlideShowData *real_slideshow_start(ImageWindow *imd, LayoutWindow *lw, ss->from_selection = FALSE; - ss->stop_func = stop_func; - ss->stop_data = stop_data; + ss->stop_func = NULL; ss->timeout_id = -1; - ss->paused = FALSE; if (ss->path_list) @@ -382,9 +380,13 @@ static SlideShowData *real_slideshow_start(ImageWindow *imd, LayoutWindow *lw, if (slideshow_step(ss, TRUE)) { slideshow_timer_reset(ss, TRUE); + + ss->stop_func = stop_func; + ss->stop_data = stop_data; } else { + slideshow_free(ss); ss = NULL; }