From: Dirk Lemstra Date: Sun, 2 Jun 2019 13:14:25 +0000 (+0200) Subject: Added missing calls to RegCloseKey. X-Git-Tag: 7.0.8-49~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c8e378430bb2ff96b7c5f72486c5e643638e761;p=imagemagick Added missing calls to RegCloseKey. --- diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index 081ed0eb2..0cfa8ca1c 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -1722,6 +1722,7 @@ MagickExport MagickBooleanType NTLongPathsEnabled() ®istry_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;