[evolution-data-server/gnome-3-0] Bug #656480 - Memory leak in camel_folder_search_search()



commit ebdb1c4315577bdbf2111dd7d1fa6694757ff31f
Author: David Woodhouse <David Woodhouse intel com>
Date:   Sat Aug 13 23:40:18 2011 +0100

    Bug #656480 - Memory leak in camel_folder_search_search()
    
    We don't unref sexp on failure.
    (cherry picked from commit 86f95492d12843611f9cbb7f8635604f4f251278)

 camel/camel-search-sql-sexp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index 53bbf11..7e28d75 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -629,8 +629,11 @@ camel_sexp_to_sql_sexp (const gchar *sql)
 	e_sexp_parse (sexp);
 
 	r = e_sexp_eval (sexp);
-	if (!r)
+	if (!r) {
+		e_sexp_unref (sexp);
 		return NULL;
+	}
+
 	if (r->type == ESEXP_RES_STRING) {
 		res = g_strdup (r->value.string);
 	} else



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