summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-02-02 20:08:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-02-02 20:08:49 +0000
commit1d3b98e5f5311479cd87f20e3656b0133bff73bd (patch)
tree95eea2fcac18f236b31053e4d1493aa644760df0 /src/sp-filter.cpp
parentupdate to trunk (diff)
parentTranslations. Arabic translation update. (diff)
downloadinkscape-1d3b98e5f5311479cd87f20e3656b0133bff73bd.tar.gz
inkscape-1d3b98e5f5311479cd87f20e3656b0133bff73bd.zip
update to trunk
(bzr r13645.1.4)
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 9a184952c..9cb33a6f3 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -465,6 +465,10 @@ int sp_filter_set_image_name(SPFilter *filter, gchar const *name) {
pair<gchar*,int> new_pair(name_copy, value);
pair<map<gchar*,int,ltstr>::iterator,bool> ret = filter->_image_name->insert(new_pair);
if (ret.second == false) {
+ // The element is not inserted (because an element with the same key was already in the map)
+ // Therefore, free the memory allocated for the new entry:
+ free(name_copy);
+
return (*ret.first).second;
}
return value;