Memory leak in macro ThrowFileException()
Posted: 2011-01-24T02:40:45-07:00
I found a memory leak for the macro ThrowFileException() in magick/exception-private.h
It might be not a big deal.
But I wrote a daemon process using ImageMagick library,
and this leak _matters_ as the daemon's life time goes by.
Here is my patch.
It might be not a big deal.
But I wrote a daemon process using ImageMagick library,
and this leak _matters_ as the daemon's life time goes by.
Here is my patch.
Code: Select all
#define ThrowFileException(exception,severity,tag,context) \
{ \
char *emsg=GetExceptionMessage(errno); \
(void) ThrowMagickException(exception,GetMagickModule(),severity, \
tag == (const char *) NULL ? "unknown" : tag,"`%s': %s",context, \
emsg); \
DestroyString(emsg); \
}