diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-09-30 20:54:01 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-09-30 20:54:01 +0000 |
| commit | fe0875caf2b1b0519ed009acbd004a675f14f772 (patch) | |
| tree | c6f619b2df9963c5f6200de9ba684cd7597b16a9 /src/text-chemistry.cpp | |
| parent | fix previous commit (diff) | |
| download | inkscape-fe0875caf2b1b0519ed009acbd004a675f14f772.tar.gz inkscape-fe0875caf2b1b0519ed009acbd004a675f14f772.zip | |
more string leaks
(bzr r12642)
Diffstat (limited to 'src/text-chemistry.cpp')
| -rw-r--r-- | src/text-chemistry.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index 5bcdfdd33..532d19e02 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -152,7 +152,9 @@ text_put_on_path() // create textPath and put it into the text Inkscape::XML::Node *textpath = xml_doc->createElement("svg:textPath"); // reference the shape - textpath->setAttribute("xlink:href", g_strdup_printf("#%s", shape->getRepr()->attribute("id"))); + gchar *href_str = g_strdup_printf("#%s", shape->getRepr()->attribute("id")); + textpath->setAttribute("xlink:href", href_str); + g_free(href_str); if (text_alignment == Inkscape::Text::Layout::RIGHT) { textpath->setAttribute("startOffset", "100%"); } else if (text_alignment == Inkscape::Text::Layout::CENTER) { @@ -331,7 +333,9 @@ text_flow_into_shape() Inkscape::XML::Node *clone = xml_doc->createElement("svg:use"); clone->setAttribute("x", "0"); clone->setAttribute("y", "0"); - clone->setAttribute("xlink:href", g_strdup_printf("#%s", item->getRepr()->attribute("id"))); + gchar *href_str = g_strdup_printf("#%s", item->getRepr()->attribute("id")); + clone->setAttribute("xlink:href", href_str); + g_free(href_str); // add the new clone to the region region_repr->appendChild(clone); |
