summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
authorbuliabyak <>2013-09-28 16:57:04 +0000
committerbuliabyak <>2013-09-28 16:57:04 +0000
commite3fe3144bd276bbab4b52aa5d65ac7d487989ff5 (patch)
treecba4ca4e7d935d70148855ad9791bdc8c89390f1 /src/sp-item.cpp
parentreturn value of g_utf16_to_utf8 was leaking here (diff)
downloadinkscape-e3fe3144bd276bbab4b52aa5d65ac7d487989ff5.tar.gz
inkscape-e3fe3144bd276bbab4b52aa5d65ac7d487989ff5.zip
another place where getURI()->toString() values were leaking
(bzr r12610)
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index a99bf85cc..89e995b5f 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -665,16 +665,20 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X
if (item->clip_ref){
if (item->clip_ref->getObject()) {
- const gchar *value = g_strdup_printf ("url(%s)", item->clip_ref->getURI()->toString());
+ gchar *uri = item->clip_ref->getURI()->toString();
+ const gchar *value = g_strdup_printf ("url(%s)", uri);
repr->setAttribute ("clip-path", value);
g_free ((void *) value);
+ g_free ((void *) uri);
}
}
if (item->mask_ref){
if (item->mask_ref->getObject()) {
- const gchar *value = g_strdup_printf ("url(%s)", item->mask_ref->getURI()->toString());
+ gchar *uri = item->mask_ref->getURI()->toString();
+ const gchar *value = g_strdup_printf ("url(%s)", uri);
repr->setAttribute ("mask", value);
g_free ((void *) value);
+ g_free ((void *) uri);
}
}