From: billh Date: Mon, 1 Mar 2004 14:34:06 +0000 (+0000) Subject: Suppress SEGVs due to improper traveral of leaked-objects list; X-Git-Tag: AT_SPI2_CORE_0_1_3~615 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27b386b83c79c050d0515232b42cab55e8df060f;p=platform%2Fupstream%2Fat-spi2-core.git Suppress SEGVs due to improper traveral of leaked-objects list; only report leaked objects if DEBUG_OBJECTS is #defined. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@620 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index 6fabf92..3392d1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-03-01 Bill Haneman + + * cspi/spi_main.c: + (SPI_exit): Removed "bye-bye" exit message. + Moved "leak" report to happen before the + iteration over the leaked refs list. + Don't PRINT_LEAKS unless DEBUG_OBJECTS is also #defined. + 2004-02-24 Bill Haneman * configure.in: Revved to 1.3.13. diff --git a/cspi/spi_main.c b/cspi/spi_main.c index b89a407..f5b385d 100644 --- a/cspi/spi_main.c +++ b/cspi/spi_main.c @@ -495,27 +495,23 @@ SPI_exit (void) if (live_refs) { leaked = g_hash_table_size (live_refs); +#ifdef DEBUG_OBJECTS + fprintf (stderr, "Leaked %d SPI handles\n", leaked); + #define PRINT_LEAKS #ifdef PRINT_LEAKS g_hash_table_foreach (live_refs, report_leaked_ref, NULL); #endif + +#endif } else { leaked = 0; } -#ifdef DEBUG_OBJECTS - if (leaked) - { - fprintf (stderr, "Leaked %d SPI handles\n", leaked); - } -#endif - cspi_cleanup (); - fprintf (stderr, "bye-bye!\n"); - return leaked; }