+2007-06-06 [colin] 2.9.2cvs44
+
+ * src/ldapupdate.c
+ Fix strange allocations.
+
2007-06-06 [colin] 2.9.2cvs43
* src/ldapupdate.c
( cvs diff -u -r 1.149.2.73 -r 1.149.2.74 src/inc.c; ) > 2.9.2cvs41.patchset
( cvs diff -u -r 1.105.2.100 -r 1.105.2.101 src/prefs_account.c; cvs diff -u -r 1.52.2.39 -r 1.52.2.40 src/prefs_folder_item.c; cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/prefs_quote.c; cvs diff -u -r 1.8.2.18 -r 1.8.2.19 src/quote_fmt.c; cvs diff -u -r 1.5.12.10 -r 1.5.12.11 src/quote_fmt.h; ) > 2.9.2cvs42.patchset
( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/ldapupdate.c; ) > 2.9.2cvs43.patchset
+( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/ldapupdate.c; ) > 2.9.2cvs44.patchset
mailList = g_hash_table_lookup(contact , "mail");
if (mailList) {
char **tmp;
- mail = g_malloc(sizeof(*mail));
- tmp = g_malloc(sizeof(*tmp));
+ tmp = g_malloc(sizeof(*tmp) * (g_list_length(mailList)+1));
mail = tmp;
while (mailList) {
EmailKeyValue *item = mailList->data;
debug_print("# of mail: %d\n", g_list_length(mailList));
if (!(strcmp("mail", NoRemove->attribute) == 0 && g_list_length(mailList) == 1)) {
char **tmp;
- mail = g_malloc(sizeof(*mail));
- tmp = g_malloc(sizeof(*tmp));
+ tmp = g_malloc(sizeof(*tmp) * (g_list_length(mailList)+1));
mail = tmp;
while (mailList) {
EmailKeyValue *item = mailList->data;