summaryrefslogtreecommitdiffstats
path: root/src/extension/param/radiobutton.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-11-08 21:35:22 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-11-08 21:35:22 +0000
commite82db5320b8f94be360d5892c08eadcf84c4d7e1 (patch)
treea3f5eec3076d4e28eee21e37a110c6f4e98e6a76 /src/extension/param/radiobutton.cpp
parentfix missing assignment to variable. (diff)
downloadinkscape-e82db5320b8f94be360d5892c08eadcf84c4d7e1.tar.gz
inkscape-e82db5320b8f94be360d5892c08eadcf84c4d7e1.zip
sp-filter: fix memory leak when trying to set a duplicate name for an image.
This function could use more cleanup, but because I can't test now, I will write it down here: int sp_filter_set_image_name(SPFilter *filter, gchar const *name) { gchar *name_copy = strdup(name); pair<gchar*,int> new_pair(name_copy, filter->_image_number_next++); // post-increment number_next 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; } (bzr r13684)
Diffstat (limited to 'src/extension/param/radiobutton.cpp')
0 files changed, 0 insertions, 0 deletions