[epiphany/history-rewrite] ephy_history_service_execute_set_url_title: don't leak the title



commit 247682a6cad2222547d6d01c7761c168497ded39
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Jul 5 13:39:16 2011 +0300

    ephy_history_service_execute_set_url_title: don't leak the title

 lib/history/ephy-history-service.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 3a1c670..0adc159 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -513,10 +513,11 @@ ephy_history_service_execute_set_url_title (EphyHistoryService *self,
                                             EphyHistoryURL *url,
                                             gpointer *result)
 {
-  char *title = url->title;
+  char *title = g_strdup (url->title);
 
   if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
     /* The URL is not yet in the database, so we can't update it.. */
+    g_free (title);
     return FALSE;
   } else {
     g_free (url->title);



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