### Eclipse Workspace Patch 1.0 #P ecos Index: services/profile/gprof/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/services/profile/gprof/current/ChangeLog,v retrieving revision 1.9 diff -u -r1.9 ChangeLog --- services/profile/gprof/current/ChangeLog 21 Dec 2007 16:47:15 -0000 1.9 +++ services/profile/gprof/current/ChangeLog 10 Mar 2008 13:45:01 -0000 @@ -1,3 +1,7 @@ +2008-03-10 Oyvind Harboe + + * src/profile.c: plug memory leak. + 2007-12-14 Oyvind Harboe 2007-12-21 Jonathan Larmour Index: services/profile/gprof/current/src/profile.c =================================================================== RCS file: /cvs/ecos/ecos/packages/services/profile/gprof/current/src/profile.c,v retrieving revision 1.6 diff -u -r1.6 profile.c --- services/profile/gprof/current/src/profile.c 21 Dec 2007 16:47:15 -0000 1.6 +++ services/profile/gprof/current/src/profile.c 10 Mar 2008 13:45:01 -0000 @@ -577,10 +577,15 @@ profile_enabled = 1; -#ifdef CYGPKG_PROFILE_TFTP - // Create a TFTP server to provide the data - // invoking this a second time is harmless - (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops); +#ifdef CYGPKG_PROFILE_TFTP + static int launched = 0; + if (!launched) + { + launched = 1; + // Create a TFTP server to provide the data + // invoking this a second time is harmless + (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops); + } #endif }