From fa7f1fce98878c6ba1df5e3279261dcec5934a63 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 16 Apr 2008 13:19:31 +0000 Subject: [PATCH] always initialize mod_type --- ext/ldap/ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 044388a0ed..06274a4bfd 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1322,6 +1322,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper) for (i = 0; i < num_attribs; i++) { ldap_mods[i] = emalloc(sizeof(LDAPMod)); ldap_mods[i]->mod_op = oper | LDAP_MOD_BVALUES; + ldap_mods[i]->mod_type = NULL; res = zend_hash_get_current_key_ex(Z_ARRVAL_P(entry), &attribute, &attribute_len, &index, 0, NULL); if (res == HASH_KEY_IS_STRING) { @@ -1331,7 +1332,6 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper) if (tmp) { ldap_mods[i]->mod_type = estrdup(tmp); } else { - ldap_mods[i]->mod_type = NULL; goto error_out; } } else { -- 2.50.1