https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5382
diff --git a/coders/xps.c b/coders/xps.c
index af33671..5a2e5bc 100644
--- a/coders/xps.c
+++ b/coders/xps.c
@@ -273,7 +273,10 @@
      else
        delegate_info=GetDelegateInfo("xps:color",(char *) NULL,exception);
   if (delegate_info == (const DelegateInfo *) NULL)
-    return((Image *) NULL);
+    {
+      image=DestroyImage(image);
+      return((Image *) NULL);
+    }
   density=AcquireString("");
   options=AcquireString("");
   (void) FormatLocaleString(density,MagickPathExtent,"%gx%g",