summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2012-08-30 09:32:26 -0300
committerFelipe Pena <felipensp@gmail.com>2012-08-30 09:32:26 -0300
commiteb8d603d464af6e50a0907cf4f47a6dc60bce4b5 (patch)
tree1f7384245a8ca9345866b4fc00b8f2ffb75194c3 /win32
parent677de8568ae43d3b83f1558dcd15f1008119129c (diff)
parentde884997e0bc5cfc49b955099f369d1beae941b0 (diff)
downloadphp-git-eb8d603d464af6e50a0907cf4f47a6dc60bce4b5.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: - Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows registry)
Diffstat (limited to 'win32')
-rw-r--r--win32/registry.c9
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;