[balsa] address-book-ldif: Fix a use-after-free



commit db904e5a37f901255f7cdea0a26e86d4333af29b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Jun 10 14:12:52 2019 -0400

    address-book-ldif: Fix a use-after-free

 libbalsa/address-book-ldif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libbalsa/address-book-ldif.c b/libbalsa/address-book-ldif.c
index 006e2435c..f17e3a189 100644
--- a/libbalsa/address-book-ldif.c
+++ b/libbalsa/address-book-ldif.c
@@ -223,7 +223,6 @@ address_new_prefill(LibBalsaAddress * address, GList * address_list,
     full_name = build_name(fulln, libbalsa_address_get_first_name(address), surn);
     if (full_name != NULL) {
         libbalsa_address_set_full_name(address, full_name);
-        g_free(full_name);
     } else {
         libbalsa_address_set_full_name(address, _("No-Name"));
     }
@@ -243,6 +242,8 @@ address_new_prefill(LibBalsaAddress * address, GList * address_list,
         libbalsa_address_set_nick_name(address,
                                        full_name != NULL ? full_name : _("No-Id"));
     }
+
+    g_free(full_name);
 }
 
 /* Class methods */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]