WritePDFImage(): Make sure to free 'xref' before returning. (ImageMagick CVE-2019-7397)

refers to http://hg.graphicsmagick.org/hg/GraphicsMagick/rev/11ad3aeb8ab1

diff -r e29c20957e2d -r 11ad3aeb8ab1 coders/pdf.c
--- a/coders/pdf.c	Sun Feb 10 17:07:33 2019 -0600
+++ b/coders/pdf.c	Mon Feb 11 20:31:53 2019 -0600
@@ -1,5 +1,5 @@
 /*
-% Copyright (C) 2003-2018 GraphicsMagick Group
+% Copyright (C) 2003-2019 GraphicsMagick Group
 % Copyright (C) 2002 ImageMagick Studio
 % Copyright 1991-1999 E. I. du Pont de Nemours and Company
 %
@@ -1375,6 +1375,7 @@
                 if (!status)
                   {
                     CloseBlob(image);
+                    MagickFreeMemory(xref);
                     return(False);
                   }
                 break;
@@ -1478,6 +1479,7 @@
                   if (!status)
                     {
                       CloseBlob(image);
+                      MagickFreeMemory(xref);
                       return(False);
                     }
                   break;




