Use the correct function for free'ing objects, and maybe we won't crash.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Apr 2008 23:12:16 +0000 (23:12 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Apr 2008 23:12:16 +0000 (23:12 +0000)
(closes issue #12163)
 Reported by: gservat
 Patches:
       20080411__bug12163.diff.txt uploaded by Corydon76 (license 14)
 Tested by: gservat

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114085 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_ldap.c

index 3344b3d..a88e480 100644 (file)
@@ -326,7 +326,7 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
                                }
                                v++;
                        }
-                       ber_bvecfree(values);
+                       ldap_value_free_len(values);
                }
                ldap_attribute_name = ldap_next_attribute(ldapConn, ldap_entry, ber);
        }
@@ -492,7 +492,7 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
                                                }
                                                v++;
                                        } /*!< while(*v) */
-                                       ber_bvecfree(values);
+                                       ldap_value_free_len(values);
                                }/*!< if (values) */
                                ldap_attribute_name = ldap_next_attribute(ldapConn, ldap_entry, ber);
                        } /*!< while (ldap_attribute_name) */