]> granicus.if.org Git - imagemagick/commitdiff
Added missing calls to RegCloseKey.
authorDirk Lemstra <dirk@lemstra.org>
Sun, 2 Jun 2019 13:14:25 +0000 (15:14 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Sun, 2 Jun 2019 13:14:25 +0000 (15:14 +0200)
MagickCore/nt-base.c

index 081ed0eb200788b88972315e00b76c0436a4daea..0cfa8ca1c35bdbe489dc8e90f954510593f7edd0 100644 (file)
@@ -1722,6 +1722,7 @@ MagickExport MagickBooleanType NTLongPathsEnabled()
         &registry_key);
       if (status != ERROR_SUCCESS)
       {
+        RegCloseKey(registry_key);
         long_paths_enabled=0;
         return(MagickFalse);
       }
@@ -1730,11 +1731,13 @@ MagickExport MagickBooleanType NTLongPathsEnabled()
         NULL);
       if ((status != ERROR_SUCCESS) || (type != REG_DWORD))
       {
+        RegCloseKey(registry_key);
         long_paths_enabled=0;
         return(MagickFalse);
       }
       status=RegQueryValueExA(registry_key,"LongPathsEnabled",0,&type,&value,
         &size);
+      RegCloseKey(registry_key);
       if (status != ERROR_SUCCESS)
       {
         long_paths_enabled=0;