php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62955
Patch registry.patch revision 2012-08-29 09:45 UTC by aserbulov at parallels dot com

Patch registry.patch for PHP options/info functions Bug #62955

Patch version 2012-08-29 09:45 UTC

Return to Bug #62955 | Download this patch
Patch Revisions:

Developer: aserbulov@parallels.com

--- win32/registry.c	Wed Aug 15 11:26:05 2012
+++ win32/registry.c	Wed Aug 29 16:36:46 2012
@@ -77,11 +77,13 @@
 				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) {
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 02:02:10 2014 UTC