[evolution-mapi] Benefit from new behavior of i_cal_attach_new_from_data() in libical-glib 3.0.7



commit cbf98b66f47c78d660df0b08d10087f8c8e272e3
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 23 11:43:46 2020 +0100

    Benefit from new behavior of i_cal_attach_new_from_data() in libical-glib 3.0.7
    
    The benefit is that it can avoid redundant memory allocation of attachment
    data.
    
    The version of libical-glib is enforced transitively, from the dependency
    on evolution-data-server, which did bump the requirement in
    https://gitlab.gnome.org/GNOME/evolution-data-server/commit/77384ab552c19bf374dbeda53dc37f98d07bd4ec
    
    Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/185

 src/libexchangemapi/e-mapi-cal-utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/libexchangemapi/e-mapi-cal-utils.c b/src/libexchangemapi/e-mapi-cal-utils.c
index f742821..c66155e 100644
--- a/src/libexchangemapi/e-mapi-cal-utils.c
+++ b/src/libexchangemapi/e-mapi-cal-utils.c
@@ -832,8 +832,7 @@ set_attachments_to_comp (EMapiConnection *conn,
                        filename = e_mapi_util_find_array_propval (&attach->properties, PidTagAttachFilename);
 
                base64 = g_base64_encode ((const guchar *) data_lpb, data_cb);
-               new_attach = i_cal_attach_new_from_data (base64, NULL, NULL);
-               g_free (base64);
+               new_attach = i_cal_attach_new_from_data (base64, (GFunc) g_free, NULL);
 
                prop = i_cal_property_new_attach (new_attach);
                g_object_unref (new_attach);


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