summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/combo-box-entry-tool-item.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-10 11:05:48 +0000
committerNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-11 11:21:28 +0000
commit487f0940377b4fbf9ebae8ab2a53f2f992e60deb (patch)
tree00ffcad1a7ebd3d958ec76f117f4e67457c4caed /src/ui/widget/combo-box-entry-tool-item.cpp
parentRemove warnings of unhandled items on Mac check menu items, thanks to Nathan ... (diff)
downloadinkscape-487f0940377b4fbf9ebae8ab2a53f2f992e60deb.tar.gz
inkscape-487f0940377b4fbf9ebae8ab2a53f2f992e60deb.zip
Reduce memory leak on editing text, etc.
Diffstat (limited to 'src/ui/widget/combo-box-entry-tool-item.cpp')
-rw-r--r--src/ui/widget/combo-box-entry-tool-item.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/widget/combo-box-entry-tool-item.cpp b/src/ui/widget/combo-box-entry-tool-item.cpp
index f3786c6f6..11dd8459d 100644
--- a/src/ui/widget/combo-box-entry-tool-item.cpp
+++ b/src/ui/widget/combo-box-entry-tool-item.cpp
@@ -475,6 +475,7 @@ ComboBoxEntryToolItem::get_active_row_from_text(ComboBoxEntryToolItem *action,
// Case sensitive compare
if( strcmp( target_text, text ) == 0 ){
found = true;
+ g_free(text);
break;
}
} else {
@@ -486,9 +487,11 @@ ComboBoxEntryToolItem::get_active_row_from_text(ComboBoxEntryToolItem *action,
g_free( target_text_casefolded );
if( equal ) {
found = true;
+ g_free(text);
break;
}
}
+ g_free(text);
}
++row;