[evolution-ews/gnome-3-30] Fix an invalid unref call and a memory leak of an EEwsConnection object



commit 435aa3b18e305bd69c8053c8f389fea0c170daf8
Author: Milan Crha <mcrha redhat com>
Date:   Fri Sep 7 10:13:34 2018 +0200

    Fix an invalid unref call and a memory leak of an EEwsConnection object

 src/camel/camel-ews-folder.c | 2 +-
 src/camel/camel-ews-search.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 0cbf4a77..d388bd27 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -1020,7 +1020,7 @@ exit:
 
        if (mime_fname_new)
                g_free (mime_fname_new);
-       g_object_unref (cnc);
+       g_clear_object (&cnc);
 
        return message;
 }
diff --git a/src/camel/camel-ews-search.c b/src/camel/camel-ews-search.c
index 8f228170..71ca36ad 100644
--- a/src/camel/camel-ews-search.c
+++ b/src/camel/camel-ews-search.c
@@ -267,6 +267,7 @@ ews_search_process_criteria (CamelSExp *sexp,
                        e_ews_folder_id_free (fid);
                }
 
+               g_clear_object (&connection);
                g_free (folder_id);
        }
 


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