File ImageMagick-CVE-2018-14437.patch of Package ImageMagick.8117

diff --git a/coders/meta.c b/coders/meta.c
index 121dc682bd..26aef22e4f 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -430,14 +430,23 @@ static ssize_t parse8BIM(Image *ifile, Image *ofile)
                     ssize_t diff = outputlen - savedolen;
                     currentpos = TellBlob(ofile);
                     if (currentpos < 0)
-                      return(-1);
+                      {
+                        line=DestroyString(line);
+                        return(-1);
+                      }
                     offset=SeekBlob(ofile,savedpos,SEEK_SET);
                     if (offset < 0)
-                      return(-1);
+                      {
+                        line=DestroyString(line);
+                        return(-1);
+                      }
                     (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
                     offset=SeekBlob(ofile,currentpos,SEEK_SET);
                     if (offset < 0)
-                      return(-1);
+                      {
+                        line=DestroyString(line);
+                        return(-1);
+                      }
                     savedolen = 0L;
                   }
                 if (outputlen & 1)
openSUSE Build Service is sponsored by