summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-06-14 16:02:21 +0200
committerOndřej Surý <ondrej@sury.org>2012-06-14 16:02:21 +0200
commitf0f8d7084aec4be5c07f02f2e29c2820f85c8315 (patch)
tree02e9b39d5b0088a0e27126010c96a748d824d055 /win32
parent90ceaa9e92fadfef4c21ec0f76063c4387beb561 (diff)
downloadphp-f0f8d7084aec4be5c07f02f2e29c2820f85c8315.tar.gz
Imported Upstream version 5.4.4upstream/5.4.4
Diffstat (limited to 'win32')
-rw-r--r--win32/registry.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/win32/registry.c b/win32/registry.c
index 45e842b45..35b411f4c 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -77,16 +77,11 @@ 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));
+ 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;
- }
INIT_PZVAL(data);
Z_STRVAL_P(data) = zend_strndup(value, value_len-1);
Z_STRLEN_P(data) = value_len-1;
@@ -179,9 +174,6 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC)
if (!PW32G(registry_directories)) {
PW32G(registry_directories) = (HashTable*)malloc(sizeof(HashTable));
- if (!PW32G(registry_directories)) {
- return;
- }
zend_hash_init(PW32G(registry_directories), 0, NULL, delete_internal_hashtable, 1);
if (!OpenPhpRegistryKey("\\Per Directory Values", &PW32G(registry_key))) {
PW32G(registry_key) = NULL;