summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Mathog <mathog@caltech.edu>2014-02-09 11:08:00 +0000
committerKris <Kris.De.Gussem@hotmail.com>2014-02-09 11:08:00 +0000
commitc94100093bbd8a68b6da68e75a41600524d66757 (patch)
treeb4f83f6c330fa79c613be421575bee087ce485f3 /src
parentmore robust versions of triangle.py and wireframe_sphere.py, see rev 13007 (diff)
downloadinkscape-c94100093bbd8a68b6da68e75a41600524d66757.tar.gz
inkscape-c94100093bbd8a68b6da68e75a41600524d66757.zip
memleak fix
(bzr r13013)
Diffstat (limited to 'src')
-rw-r--r--src/desktop-style.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index 00b9db7d0..bab9635a9 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -587,11 +587,15 @@ objects_query_fillstroke (GSList *objects, SPStyle *style_res, bool const isfill
paint_res->colorSet = paint->colorSet;
paint_res->currentcolor = paint->currentcolor;
if (paint_res->set && paint_effectively_set && paint->isPaintserver()) { // copy the server
+ gchar const *string = NULL; // memory leak results if style->get* called inside sp_style_set_to_uri_string.
if (isfill) {
- sp_style_set_to_uri_string (style_res, true, style->getFillURI());
+ string = style->getFillURI();
+ sp_style_set_to_uri_string (style_res, true, string);
} else {
- sp_style_set_to_uri_string (style_res, false, style->getStrokeURI());
+ string = style->getStrokeURI();
+ sp_style_set_to_uri_string (style_res, false, string);
}
+ if(string)g_free((void *) string);
}
paint_res->set = paint_effectively_set;
style_res->fill_rule.computed = style->fill_rule.computed; // no averaging on this, just use the last one