+2006-04-27 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gbookmarkfile.c (g_bookmark_file_set_description)
+ (g_bookmark_file_set_title, g_bookmark_file_set_icon):
+ Remove some special-casing of empty string which led to
+ dangling pointers. (#339337, Morten Welinder)
+
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
* glib/gunibreak.h, glib/gunichartables.h: Regenerated using
+2006-04-27 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gbookmarkfile.c (g_bookmark_file_set_description)
+ (g_bookmark_file_set_title, g_bookmark_file_set_icon):
+ Remove some special-casing of empty string which led to
+ dangling pointers. (#339337, Morten Welinder)
+
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
* glib/gunibreak.h, glib/gunichartables.h: Regenerated using
if (!uri)
{
g_free (bookmark->title);
-
- if (title && title[0] != '\0')
- bookmark->title = g_strdup (title);
+ bookmark->title = g_strdup (title);
}
else
{
}
g_free (item->title);
-
- if (title && title[0] != '\0')
- item->title = g_strdup (title);
+ item->title = g_strdup (title);
item->modified = time (NULL);
}
if (!uri)
{
- g_free (bookmark->description);
-
- if (description && description[0] != '\0')
- bookmark->description = g_strdup (description);
+ g_free (bookmark->description);
+ bookmark->description = g_strdup (description);
}
else
{
}
g_free (item->description);
-
- if (description && description[0] != '\0')
- item->description = g_strdup (description);
+ item->description = g_strdup (description);
item->modified = time (NULL);
}
g_free (item->metadata->icon_href);
g_free (item->metadata->icon_mime);
- if (href && href[0] != '\0')
- item->metadata->icon_href = g_strdup (href);
+ item->metadata->icon_href = g_strdup (href);
if (mime_type && mime_type[0] != '\0')
item->metadata->icon_mime = g_strdup (mime_type);