memory leak (gif.c) for Magick 6.2.6
Posted: 2006-06-29T05:52:51-07:00
(detected with Purify on Windows XP) must be:
static LZWInfo *RelinquishLZWInfo(LZWInfo *lzw_info)
{
lzw_info->stack->codes=(unsigned long *) RelinquishMagickMemory(lzw_info->stack->codes);
lzw_info->stack=(LZWStack *) RelinquishMagickMemory(lzw_info->stack);
lzw_info=(LZWInfo *) RelinquishMagickMemory(lzw_info);
return((LZWInfo *) NULL);
}
instead of:
static LZWInfo *RelinquishLZWInfo(LZWInfo *lzw_info)
{
lzw_info->stack=(LZWStack *) RelinquishMagickMemory(lzw_info->stack);
lzw_info=(LZWInfo *) RelinquishMagickMemory(lzw_info);
return((LZWInfo *) NULL);
}
static LZWInfo *RelinquishLZWInfo(LZWInfo *lzw_info)
{
lzw_info->stack->codes=(unsigned long *) RelinquishMagickMemory(lzw_info->stack->codes);
lzw_info->stack=(LZWStack *) RelinquishMagickMemory(lzw_info->stack);
lzw_info=(LZWInfo *) RelinquishMagickMemory(lzw_info);
return((LZWInfo *) NULL);
}
instead of:
static LZWInfo *RelinquishLZWInfo(LZWInfo *lzw_info)
{
lzw_info->stack=(LZWStack *) RelinquishMagickMemory(lzw_info->stack);
lzw_info=(LZWInfo *) RelinquishMagickMemory(lzw_info);
return((LZWInfo *) NULL);
}