aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.ja4
-rw-r--r--src/syldap.c14
3 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9300b090..2ac11844 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-17
+
+ * src/syldap.c: fixed memory leaks (thanks to Michael Schwendt).
+
2007-12-07
* libsylph/codeconv.c: conv_encode_header(): use outgoing encoding
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 51d685e1..c65afad5 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,7 @@
+2007-12-17
+
+ * src/syldap.c: メモリリークを修正(Michael Schwendt さん thanks)。
+
2007-12-07
* libsylph/codeconv.c: conv_encode_header(): B または Q
diff --git a/src/syldap.c b/src/syldap.c
index 0cef9c3b..1475519f 100644
--- a/src/syldap.c
+++ b/src/syldap.c
@@ -602,10 +602,10 @@ gint syldap_search( SyldapServer *ldapServer ) {
if( g_ascii_strcasecmp( attribute, SYLDAP_ATTR_DN ) == 0 ) {
listDN = syldap_add_single_value( ld, e, attribute );
}
- }
- /* Free memory used to store attribute */
- ldap_memfree( attribute );
+ /* Free memory used to store attribute */
+ ldap_memfree( attribute );
+ }
/* Format and add items to cache */
syldap_build_items_fl( ldapServer, listAddress, listFirst, listLast );
@@ -821,8 +821,8 @@ GList *syldap_read_basedn_s( const gchar *host, const gint port, const gchar *bi
}
ldap_value_free( vals );
}
+ ldap_memfree( attribute );
}
- ldap_memfree( attribute );
if( ber != NULL ) {
ber_free( ber, 0 );
}
@@ -863,8 +863,8 @@ GList *syldap_read_basedn_s( const gchar *host, const gint port, const gchar *bi
}
ldap_value_free( vals );
}
+ ldap_memfree( attribute );
}
- ldap_memfree( attribute );
if( ber != NULL ) {
ber_free( ber, 0 );
}
@@ -950,8 +950,8 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
}
ldap_value_free( vals );
}
+ ldap_memfree( attribute );
}
- ldap_memfree( attribute );
if( ber != NULL ) {
ber_free( ber, 0 );
}
@@ -994,8 +994,8 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
}
ldap_value_free( vals );
}
+ ldap_memfree( attribute );
}
- ldap_memfree( attribute );
if( ber != NULL ) {
ber_free( ber, 0 );
}