diff options
author | Johannes Schlüter <johannes@php.net> | 2012-08-30 21:54:13 +0200 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2012-08-30 21:54:13 +0200 |
commit | 59263e386fe367f7e298fc27bf95660997db82fd (patch) | |
tree | d5992c31b8eee7cf473b089936f95e9be5e4e94c | |
parent | 602bb125c3af3942af9fd2bf72ec8bc4197e73bd (diff) | |
parent | 8afb848e18187974df79d3ddc8d215695d7cf632 (diff) | |
download | php-git-59263e386fe367f7e298fc27bf95660997db82fd.tar.gz |
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
-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; |