mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix leaking registry key handle
This commit is contained in:
parent
fca341699e
commit
ea2e197224
1 changed files with 1 additions and 0 deletions
|
@ -272,6 +272,7 @@ char *GetIniPathFromRegistry()
|
||||||
DWORD buflen = MAXPATHLEN;
|
DWORD buflen = MAXPATHLEN;
|
||||||
reg_location = emalloc(MAXPATHLEN+1);
|
reg_location = emalloc(MAXPATHLEN+1);
|
||||||
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, &buflen) != ERROR_SUCCESS) {
|
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, &buflen) != ERROR_SUCCESS) {
|
||||||
|
RegCloseKey(hKey);
|
||||||
efree(reg_location);
|
efree(reg_location);
|
||||||
reg_location = NULL;
|
reg_location = NULL;
|
||||||
return reg_location;
|
return reg_location;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue