com php-src: - Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows registry): win32/registry.c
| From: | Johannes Schlüter | Date: | Wed, 12 Sep 2012 21:22:48 +0000 |
| Subject: | com php-src: - Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows registry): win32/registry.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70159@lists.php.net to get a copy of this message | ||
Commit: c1efbad899e9202aaddd36491163f951f09344f0
Author: Felipe Pena <felipensp@gmail.com> Thu, 30 Aug 2012 09:32:13 -0300
Committer: Johannes Schlüter <johannes@php.net> Wed, 12 Sep 2012 23:22:48 +0200
Parents: 8d987032b3f6dfb882af83e4fe2c6d2be4341cce
Branches: PHP-5.3.17
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c1efbad899e9202aaddd36491163f951f09344f0
Log:
- Fixed bug #62955 (Only one directive is loaded from "Per Directory Values" Windows
registry)
Bugs:
https://bugs.php.net/62955
Changed paths:
M win32/registry.c
Diff:
diff --git a/win32/registry.c b/win32/registry..c
index 45e842b..638d85a 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;