The vulnerability is a memory leak in the ASHLAR image encoder in ImageMagick. The provided commit 30ce0e8efbd72fd6b50ed3a10ae22f57c8901137 directly addresses this issue. The patch modifies the coders/ashlar.c file, specifically within the ASHLARImage function. Before the patch, CloneDrawInfo was called to allocate a DrawInfo object, but there was no corresponding call to DestroyDrawInfo to free the allocated memory. This would cause a memory leak whenever an image with specific properties (a label) was processed. The fix involves two changes: moving the CloneDrawInfo call to be conditional on the presence of a label, and, more importantly, adding a call to DestroyDrawInfo after the DrawInfo object is used. Therefore, the ASHLARImage function is the vulnerable function, as it is the one that contained the memory leak.