1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 15:12:39 +02:00

fix leaking registry key handle

This commit is contained in:
Anatol Belski
2015-03-09 20:38:34 +01:00
parent fca341699e
commit ea2e197224

View File

@@ -272,6 +272,7 @@ char *GetIniPathFromRegistry()
DWORD buflen = MAXPATHLEN;
reg_location = emalloc(MAXPATHLEN+1);
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, &buflen) != ERROR_SUCCESS) {
RegCloseKey(hKey);
efree(reg_location);
reg_location = NULL;
return reg_location;