# HG changeset patch # User gqview # Date 1164898707 0 # Node ID 197b8d2e52ceb853662130df1f714602224e7046 # Parent ac0f7f942c4d2ca3a19138c271b19a25be363684 Thu Nov 30 09:55:42 2006 John Ellis * slideshow.c (real_slideshow_start): Fix memory leak when unable to begin a slideshow. diff -r ac0f7f942c4d -r 197b8d2e52ce ChangeLog --- a/ChangeLog Thu Nov 30 03:56:25 2006 +0000 +++ b/ChangeLog Thu Nov 30 14:58:27 2006 +0000 @@ -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 -r ac0f7f942c4d -r 197b8d2e52ce TODO --- a/TODO Thu Nov 30 03:56:25 2006 +0000 +++ b/TODO Thu Nov 30 14:58:27 2006 +0000 @@ -117,7 +117,9 @@ 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 -r ac0f7f942c4d -r 197b8d2e52ce src/slideshow.c --- a/src/slideshow.c Thu Nov 30 03:56:25 2006 +0000 +++ b/src/slideshow.c Thu Nov 30 14:58:27 2006 +0000 @@ -336,11 +336,9 @@ 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 @@ 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; }