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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user