Skip to content

Commit d1b8eeb

Browse files
felipenspsmalyshev
authored andcommitted
- Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows registry)
1 parent 7fcf36c commit d1b8eeb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

win32/registry.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_
7777
value_len = max_value+1;
7878
if (RegEnumValue(key, i, name, &name_len, NULL, &type, value, &value_len) == ERROR_SUCCESS) {
7979
if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) {
80-
ht = (HashTable*)malloc(sizeof(HashTable));
8180
if (!ht) {
82-
return ret;
81+
ht = (HashTable*)malloc(sizeof(HashTable));
82+
if (!ht) {
83+
return ret;
84+
}
85+
zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1);
8386
}
84-
zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1);
85-
8687
data = (zval*)malloc(sizeof(zval));
8788
if (!data) {
8889
return ret;

0 commit comments

Comments
 (0)