tony2001                Wed Apr 16 13:19:31 2008 UTC

  Modified files:              
    /php-src/ext/ldap   ldap.c 
  Log:
  always initialize mod_type
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.182&r2=1.183&diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.182 php-src/ext/ldap/ldap.c:1.183
--- php-src/ext/ldap/ldap.c:1.182       Wed Apr 16 13:17:44 2008
+++ php-src/ext/ldap/ldap.c     Wed Apr 16 13:19:31 2008
@@ -23,7 +23,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: ldap.c,v 1.182 2008/04/16 13:17:44 tony2001 Exp $ */
+/* $Id: ldap.c,v 1.183 2008/04/16 13:19:31 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -237,7 +237,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "LDAP Support", "enabled");
-       php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.182 
2008/04/16 13:17:44 tony2001 Exp $");
+       php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.183 
2008/04/16 13:19:31 tony2001 Exp $");
 
        if (LDAPG(max_links) == -1) {
                snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -1322,6 +1322,7 @@
        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 @@
                        if (tmp) {
                                ldap_mods[i]->mod_type = estrdup(tmp);
                        } else {
-                               ldap_mods[i]->mod_type = NULL;
                                goto error_out;
                        }
                } else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to