]> granicus.if.org Git - php/commitdiff
- Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows...
authorFelipe Pena <felipensp@gmail.com>
Thu, 30 Aug 2012 12:32:13 +0000 (09:32 -0300)
committerFelipe Pena <felipensp@gmail.com>
Thu, 30 Aug 2012 12:32:13 +0000 (09:32 -0300)
win32/registry.c

index 45e842b455fa4cb1e10dd4b95d0355b438af680b..638d85ae52cdce217eb6be600c34988f9906fb0a 100644 (file)
@@ -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;