Reactos

[EXPLORER] Registry key not closed on error (#3136)

CORE-14519

authored by

Kyle Katarn and committed by
GitHub
d54e50f3 2c7ccf4b

+3 -2
+3 -2
base/shell/explorer/shellservice.cpp
··· 115 115 goto cleanup; 116 116 } 117 117 118 - RegCloseKey(hkey); 119 - 120 118 /* Initialize */ 121 119 DPA_EnumCallback(hdpa, InitializeAllCallback, &hr); 122 120 if (FAILED_UNEXPECTEDLY(hr)) 123 121 goto cleanup; 124 122 123 + RegCloseKey(hkey); 124 + 125 125 *phdpa = hdpa; 126 126 return count > 0 ? S_OK : S_FALSE; 127 127 128 128 cleanup: 129 + RegCloseKey(hkey); 129 130 *phdpa = NULL; 130 131 ShutdownShellServices(hdpa); 131 132 return hr;