mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
Fixed memory leak when creating nested exceptions in Magick++.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
2017-03-07 7.0.4-9 Cristy <quetzlzacatenango@image...>
|
||||
2017-02-09 7.0.4-8 Dirk Lemstra <dirk@lem.....org>
|
||||
* Fixed memory leak when creating nested exceptions in Magick++ (reference
|
||||
https://www.imagemagick.org/discourse-server/viewtopic.php?f=23&p=142634)
|
||||
|
||||
2017-02-07 7.0.4-8 Cristy <quetzlzacatenango@image...>
|
||||
* Unbreak build without JPEG support (reference
|
||||
https://github.com/ImageMagick/ImageMagick/pull/373).
|
||||
|
||||
|
||||
@@ -842,6 +842,7 @@ MagickPPExport void Magick::throwException(ExceptionInfo *exception_,
|
||||
|
||||
message=formatExceptionMessage(exception_);
|
||||
nestedException=(Exception *) NULL;
|
||||
q=(Exception *) NULL;
|
||||
LockSemaphoreInfo(exception_->semaphore);
|
||||
if (exception_->exceptions != (void *) NULL)
|
||||
{
|
||||
@@ -856,12 +857,18 @@ MagickPPExport void Magick::throwException(ExceptionInfo *exception_,
|
||||
exception_->description) != 0))
|
||||
{
|
||||
if (nestedException == (Exception *) NULL)
|
||||
nestedException=createException(p);
|
||||
{
|
||||
nestedException=createException(p);
|
||||
q=nestedException;
|
||||
}
|
||||
else
|
||||
{
|
||||
q=createException(p);
|
||||
nestedException->nested(q);
|
||||
nestedException=q;
|
||||
Exception
|
||||
*r;
|
||||
|
||||
r=createException(p);
|
||||
q->nested(r);
|
||||
q=r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user