A memory leak in ImageMagick 7.0.10-45 and 6.9.11-22 allows remote attackers to perform a denial of service via the "identify -help" command.
cpe:2.3:a:imagemagick:imagemagick:6.9.11-22:*:*:*:*:*:*:*
C5EDF13D-9DE8-4890-82CD-E6977434E531
cpe:2.3:a:imagemagick:imagemagick:7.0.10-45:*:*:*:*:*:*:*
5B1BCBD9-F6D7-4FFA-9E4D-4DA0D4295CA8
OR
cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
CC559B26-5DFC-4B7A-A27C-B77DE755DFF9
cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
B8EDB836-4E6A-4B71-B9B2-AA3E03E0F646
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
```
==15438==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13024 byte(s) in 1 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0a4b in AcquireCriticalMemory MagickCore/memory.c:607:10
    #3 0x7f5ee7088a9f in AcquireImageInfo MagickCore/image.c:328:28
    #4 0x7f5ee708ef55 in CloneImageInfo MagickCore/image.c:924:14
    #5 0x7f5ee6b4ff84 in IdentifyImageCommand MagickWand/identify.c:249:3
    #6 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #7 0x4c45ad in MagickMain utilities/magick.c:149:10
    #8 0x4c42a8 in main utilities/magick.c:180:10
    #9 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0c50 in AcquireQuantumMemory MagickCore/memory.c:649:10
    #3 0x7f5ee71e7d3e in ExpandFilenames MagickCore/utility.c:771:20
    #4 0x7f5ee6b4ffd9 in IdentifyImageCommand MagickWand/identify.c:258:10
    #5 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #6 0x4c45ad in MagickMain utilities/magick.c:149:10
    #7 0x4c42a8 in main magick.c:180:10
    #8 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Indirect leak of 15 byte(s) in 2 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0c50 in AcquireQuantumMemory MagickCore/memory.c:649:10
    #3 0x7f5ee71b8570 in ConstantString MagickCore/string.c:679:26
    #4 0x7f5ee71e7fad in ExpandFilenames MagickCore/utility.c:799:21
    #5 0x7f5ee6b4ffd9 in IdentifyImageCommand MagickWand/identify.c:258:10
    #6 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #7 0x4c45ad in MagickMain utilities/magick.c:149:10
    #8 0x4c42a8 in main utilities/magick.c:180:10
    #9 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: 13063 byte(s) leaked in 4 allocation(s).`
```

### Steps to Reproduce
Just the help argument of the identify command:
 ```
identify -help
```

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

- ImageMagick version:  ImageMagick 7.0.10-45 Q16 x86_64
- Environment (Operating system, version and so on): Ubuntu 20.04.1 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
- Additional information: ./configure CC="clang" CFLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer -g"

<!-- Thanks for reporting the issue to ImageMagick! -->

Memory leak in identify -help
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Memory leak in identify -help
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
```
==15438==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13024 byte(s) in 1 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0a4b in AcquireCriticalMemory MagickCore/memory.c:607:10
    #3 0x7f5ee7088a9f in AcquireImageInfo MagickCore/image.c:328:28
    #4 0x7f5ee708ef55 in CloneImageInfo MagickCore/image.c:924:14
    #5 0x7f5ee6b4ff84 in IdentifyImageCommand MagickWand/identify.c:249:3
    #6 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #7 0x4c45ad in MagickMain utilities/magick.c:149:10
    #8 0x4c42a8 in main utilities/magick.c:180:10
    #9 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0c50 in AcquireQuantumMemory MagickCore/memory.c:649:10
    #3 0x7f5ee71e7d3e in ExpandFilenames MagickCore/utility.c:771:20
    #4 0x7f5ee6b4ffd9 in IdentifyImageCommand MagickWand/identify.c:258:10
    #5 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #6 0x4c45ad in MagickMain utilities/magick.c:149:10
    #7 0x4c42a8 in main magick.c:180:10
    #8 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Indirect leak of 15 byte(s) in 2 object(s) allocated from:
    #0 0x494bad in malloc (/usr/local/bin/magick+0x494bad)
    #1 0x7f5ee70c0a35 in AcquireMagickMemory MagickCore/memory.c:531:10
    #2 0x7f5ee70c0c50 in AcquireQuantumMemory MagickCore/memory.c:649:10
    #3 0x7f5ee71b8570 in ConstantString MagickCore/string.c:679:26
    #4 0x7f5ee71e7fad in ExpandFilenames MagickCore/utility.c:799:21
    #5 0x7f5ee6b4ffd9 in IdentifyImageCommand MagickWand/identify.c:258:10
    #6 0x7f5ee6b970f0 in MagickCommandGenesis MagickWand/mogrify.c:191:14
    #7 0x4c45ad in MagickMain utilities/magick.c:149:10
    #8 0x4c42a8 in main utilities/magick.c:180:10
    #9 0x7f5ee62070b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: 13063 byte(s) leaked in 4 allocation(s).`
```

### Steps to Reproduce
Just the help argument of the identify command:
 ```
identify -help
```

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

- ImageMagick version:  ImageMagick 7.0.10-45 Q16 x86_64
- Environment (Operating system, version and so on): Ubuntu 20.04.1 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
- Additional information: ./configure CC="clang" CFLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer -g"

<!-- Thanks for reporting the issue to ImageMagick! -->

--- end body ---

comments :
--- start comments ---

--- end comments ---