summaryrefslogtreecommitdiffstats
path: root/src/id-clash.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-09-20 20:40:55 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-09-20 20:40:55 +0000
commitbac4df147de363a0774548acd63d367a09ab50d3 (patch)
tree849f3bc54cfa4ba5d9e219173bcc5d5240b38375 /src/id-clash.cpp
parentTranslations. inkscape.pot update. (diff)
downloadinkscape-bac4df147de363a0774548acd63d367a09ab50d3.tar.gz
inkscape-bac4df147de363a0774548acd63d367a09ab50d3.zip
some memleak fixes (Bug #1043571)
(bzr r11686)
Diffstat (limited to '')
-rw-r--r--src/id-clash.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/id-clash.cpp b/src/id-clash.cpp
index 05a3149fc..7a1e000fb 100644
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
@@ -260,10 +260,9 @@ fix_up_refs(const refmap_type *refmap, const id_changelist_type &id_changes)
gchar *url = g_strdup_printf("url(#%s)", obj->getId());
sp_repr_css_set_property(style, it->attr, url);
g_free(url);
- gchar *style_string = sp_repr_css_write_string(style);
- it->elem->getRepr()->setAttribute("style", style_string);
- g_free(style_string);
-
+ Glib::ustring style_string;
+ sp_repr_css_write_string(style, style_string);
+ it->elem->getRepr()->setAttribute("style", style_string.c_str());
} else {
g_assert(0); // shouldn't happen
}