summaryrefslogtreecommitdiffstats
path: root/src/spray-context.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-09-30 20:54:01 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-09-30 20:54:01 +0000
commitfe0875caf2b1b0519ed009acbd004a675f14f772 (patch)
treec6f619b2df9963c5f6200de9ba684cd7597b16a9 /src/spray-context.cpp
parentfix previous commit (diff)
downloadinkscape-fe0875caf2b1b0519ed009acbd004a675f14f772.tar.gz
inkscape-fe0875caf2b1b0519ed009acbd004a675f14f772.zip
more string leaks
(bzr r12642)
Diffstat (limited to 'src/spray-context.cpp')
-rw-r--r--src/spray-context.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index fd9aff196..6b97dcc17 100644
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
@@ -499,7 +499,9 @@ static bool sp_spray_recursive(SPDesktop *desktop,
// Ad the clone to the list of the father's sons
parent->appendChild(clone);
// Generates the link between father and son attributes
- clone->setAttribute("xlink:href", g_strdup_printf("#%s", old_repr->attribute("id")), false);
+ gchar *href_str = g_strdup_printf("#%s", old_repr->attribute("id"));
+ clone->setAttribute("xlink:href", href_str, false);
+ g_free(href_str);
SPObject *clone_object = doc->getObjectByRepr(clone);
// conversion object->item