diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-09-02 19:32:59 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-09-02 19:32:59 +0000 |
| commit | fd0a5dfa4cb237f8e5232c785693cc3e676336e8 (patch) | |
| tree | 74bc967114726b2e9b87ba2439cdbfed03549dde /src/id-clash.cpp | |
| parent | performance: ?? (diff) | |
| download | inkscape-fd0a5dfa4cb237f8e5232c785693cc3e676336e8.tar.gz inkscape-fd0a5dfa4cb237f8e5232c785693cc3e676336e8.zip | |
converted some c-string usage to c++ string class usage: should fix some memory leaks
(bzr r11646)
Diffstat (limited to 'src/id-clash.cpp')
| -rw-r--r-- | src/id-clash.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/id-clash.cpp b/src/id-clash.cpp index d8299652b..05af32be8 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -259,10 +259,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 } |
