ImageMagick 7.0.8-43 has a memory leak in coders/dot.c, as demonstrated by PingImage in MagickCore/constitute.c.
cpe:2.3:a:imagemagick:imagemagick:7.0.8-43:*:*:*:*:*:*:*
98A09968-FA06-4217-82A0-802531283B4F
OR
cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*
7A5301BF-1402-4BE0-A0F8-69FBE79BC6D6
cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*
23A7C53F-B80F-4E6A-AFA9-58EEA84BE11D
cpe:2.3:o:canonical:ubuntu_linux:19.04:*:*:*:*:*:*:*
CD783B0C-9246-47D9-A937-6144FE8BFF0F
cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*
A31C8344-3E02-4EB8-8BD8-4C84B7959624
OR
cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*
F1E78106-58E6-4D59-990F-75DA575BFAD9
cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
B620311B-34A3-48A6-82DF-6F078D7A4493
OR
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
07B237A9-69A3-4A9C-9DA0-4E06BD37AE73
OR
### Prerequisites

- [x] I have written a descriptive issue title
- [x] I have verified that I am using the latest version of ImageMagick
- [x] I have searched [open](https://github.com/ImageMagick/ImageMagick/issues) and [closed](https://github.com/ImageMagick/ImageMagick/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported

### Description
<!-- A description of the bug or feature -->
```
==104405==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13504 byte(s) in 1 object(s) allocated from:
    #0 0x7ff36e5f7602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x43f2a5 in AcquireMagickMemory MagickCore/memory.c:478
    #2 0x412eef in AcquireCriticalMemory MagickCore/memory-private.h:64
    #3 0x413262 in AcquireImage MagickCore/image.c:172
    #4 0x580742 in ReadDOTImage coders/dot.c:129
    #5 0x806aa6 in ReadImage MagickCore/constitute.c:547
    #6 0x4b69f6 in ReadStream MagickCore/stream.c:1043
    #7 0x805b31 in PingImage MagickCore/constitute.c:269
    #8 0x8060fd in PingImages MagickCore/constitute.c:370
    #9 0xc1b2a7 in IdentifyImageCommand MagickWand/identify.c:319
    #10 0xc9fbca in MagickCommandGenesis MagickWand/mogrify.c:185
    #11 0x40e9e1 in MagickMain utilities/magick.c:149
    #12 0x40ebc2 in main utilities/magick.c:180
    #13 0x7ff36a8e782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
```
### Steps to Reproduce
<!-- List of steps, sample code, failing test or link to a project that reproduces the behavior.
     Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues -->
run cmd:
```
/usr/local/bin/magick identify $inupt
```

### System Configuration
<!-- Tell us about the environment where you are experiencing the bug -->

- ImageMagick version: 
7.0.8-43
- Environment (Operating system, version and so on):
Linux ubuntu 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
- Additional information:
 ./configure CC="gcc" CXX="g++" CFLAGS="-g -fsanitize=address" -disable-shared

testcase:
https://github.com/butterflyhack/pocs/blob/master/memory-leaks-identify-PingImage.zip

report by ADlab of Venustech
<!-- Thanks for reporting the issue to ImageMagick! -->

memory leaks in PingImage
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : memory leaks in PingImage
Issue date:

--- start body ---
### Prerequisites

- [x] I have written a descriptive issue title
- [x] I have verified that I am using the latest version of ImageMagick
- [x] I have searched [open](https://github.com/ImageMagick/ImageMagick/issues) and [closed](https://github.com/ImageMagick/ImageMagick/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported

### Description
<!-- A description of the bug or feature -->
```
==104405==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13504 byte(s) in 1 object(s) allocated from:
    #0 0x7ff36e5f7602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x43f2a5 in AcquireMagickMemory MagickCore/memory.c:478
    #2 0x412eef in AcquireCriticalMemory MagickCore/memory-private.h:64
    #3 0x413262 in AcquireImage MagickCore/image.c:172
    #4 0x580742 in ReadDOTImage coders/dot.c:129
    #5 0x806aa6 in ReadImage MagickCore/constitute.c:547
    #6 0x4b69f6 in ReadStream MagickCore/stream.c:1043
    #7 0x805b31 in PingImage MagickCore/constitute.c:269
    #8 0x8060fd in PingImages MagickCore/constitute.c:370
    #9 0xc1b2a7 in IdentifyImageCommand MagickWand/identify.c:319
    #10 0xc9fbca in MagickCommandGenesis MagickWand/mogrify.c:185
    #11 0x40e9e1 in MagickMain utilities/magick.c:149
    #12 0x40ebc2 in main utilities/magick.c:180
    #13 0x7ff36a8e782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
```
### Steps to Reproduce
<!-- List of steps, sample code, failing test or link to a project that reproduces the behavior.
     Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues -->
run cmd:
```
/usr/local/bin/magick identify $inupt
```

### System Configuration
<!-- Tell us about the environment where you are experiencing the bug -->

- ImageMagick version: 
7.0.8-43
- Environment (Operating system, version and so on):
Linux ubuntu 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
- Additional information:
 ./configure CC="gcc" CXX="g++" CFLAGS="-g -fsanitize=address" -disable-shared

testcase:
https://github.com/butterflyhack/pocs/blob/master/memory-leaks-identify-PingImage.zip

report by ADlab of Venustech
<!-- Thanks for reporting the issue to ImageMagick! -->

--- end body ---

comments :
--- start comments ---

--- end comments ---