diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-11-09 05:13:46 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-11-09 05:13:46 +0000 |
| commit | 4b236f3f1e3fe5374e18dac9e6c35567d9dc0995 (patch) | |
| tree | d6a8f361b37294feb8da05c2ce61271e5137a237 /src/sp-filter.cpp | |
| parent | Remove FIXME from refactoring (diff) | |
| parent | Fix bug in previous commit. Add test against it (diff) | |
| download | inkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.tar.gz inkscape-4b236f3f1e3fe5374e18dac9e6c35567d9dc0995.zip | |
Update to trunk r13690
(bzr r13341.5.22)
Diffstat (limited to 'src/sp-filter.cpp')
| -rw-r--r-- | src/sp-filter.cpp | 4 |
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; |
