MapServer / MapServer-import

3 stars 2 forks source link

Memory Leak in msSetup() #2120

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: woodbri Date: 2007/06/08 - 17:00 In maputil.c, in msSetup() we call:

#ifdef USE_GD_FT
  if (gdFontCacheSetup() != 0) {
    return MS_FAILURE;
   }
#endif

We need to add a corresponding block in msCleanup() to to free this like:

#ifdef USE_GD_FT
  if (gdFontCacheShutdown() != 0) {
    return MS_FAILURE;
   }
#endif
tbonfort commented 12 years ago

Author: hobu Date: 2007/06/10 - 00:21 Steve,

I applied this patch in c07fd8477ff4c72af3bf3f7ecab1721d2b72d158 (r6188).

Howard

tbonfort commented 12 years ago

Author: woodbri Date: 2007/06/10 - 01:07 Howard,

Sorry, my bad. The patch should be as msCleanup() does not return a value.

#ifdef USE_GD_FT
  gdFontCacheShutdown();
#endif
tbonfort commented 12 years ago

Author: hobu Date: 2007/06/11 - 07:57 ok, fixed in 2af266828e414583df3b9e33378c31849afcc127 (r6189).