[epiphany] bookmark: Fix leaks in ephy_bookmark_new



commit 4ab313b322cc5bca542dfc6d183438a4557db018
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Nov 21 15:07:43 2016 -0600

    bookmark: Fix leaks in ephy_bookmark_new
    
    The property setters will duplicate the strings, they don't claim
    ownership

 src/bookmarks/ephy-bookmark.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
index 1c667a9..74320bb 100644
--- a/src/bookmarks/ephy-bookmark.c
+++ b/src/bookmarks/ephy-bookmark.c
@@ -282,8 +282,8 @@ EphyBookmark *
 ephy_bookmark_new (const char *url, const char *title, GSequence *tags)
 {
   return g_object_new (EPHY_TYPE_BOOKMARK,
-                       "url", g_strdup (url),
-                       "title", g_strdup (title),
+                       "url", url,
+                       "title", title,
                        "tags", tags,
                        "time-added", g_get_real_time (),
                        NULL);


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