diff options
author | Felipe Pena <felipensp@gmail.com> | 2012-08-30 09:32:13 -0300 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2012-09-09 14:54:13 -0700 |
commit | d1b8eeb2d8dda8bc2697d0dcea9c129f6fc77b9a (patch) | |
tree | c435ed953e73e35a9efa9354c58a4ea4d583a111 | |
parent | 7fcf36cfef896da78d64f656d975ece7d48aa359 (diff) | |
download | php-git-d1b8eeb2d8dda8bc2697d0dcea9c129f6fc77b9a.tar.gz |
- Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows registry)
-rw-r--r-- | win32/registry.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/win32/registry.c b/win32/registry.c index 45e842b455..638d85ae52 100644 --- a/win32/registry.c +++ b/win32/registry.c @@ -77,12 +77,13 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_ value_len = max_value+1; if (RegEnumValue(key, i, name, &name_len, NULL, &type, value, &value_len) == ERROR_SUCCESS) { if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) { - ht = (HashTable*)malloc(sizeof(HashTable)); if (!ht) { - return ret; + ht = (HashTable*)malloc(sizeof(HashTable)); + if (!ht) { + return ret; + } + zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1); } - zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1); - data = (zval*)malloc(sizeof(zval)); if (!data) { return ret; |