[gnumeric] SheetObjectWidget: plug leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] SheetObjectWidget: plug leak.
- Date: Sun, 1 Mar 2015 22:03:48 +0000 (UTC)
commit 640c7858caf5197e3bdfd459a638ee28d748d82d
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 1 17:03:29 2015 -0500
SheetObjectWidget: plug leak.
ChangeLog | 5 +++++
src/sheet-object-widget.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ce250b0..0fae800 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-01 Morten Welinder <terra gnome org>
+
+ * src/sheet-object-widget.c
+ (sheet_widget_list_base_set_selection_value): Plug leak.
+
2015-02-28 Jean Brefort <jean brefort normalesup org>
* src/sheet-object-image.c (gnm_soi_assign_to_sheet): ensure that the
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 1bc5d59..37c4133 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -3496,11 +3496,11 @@ sheet_widget_list_base_set_selection (SheetWidgetListBase *swl, int selection,
static void
sheet_widget_list_base_set_selection_value (SheetWidgetListBase *swl, GnmValue *v)
{
- char const *str = value_get_as_string (v);
GtkTreeIter iter;
int selection = 0, i = 1;
- if (swl->model != NULL && gtk_tree_model_get_iter_first (swl->model, &iter))
+ if (swl->model != NULL && gtk_tree_model_get_iter_first (swl->model, &iter)) {
+ char *str = value_get_as_string (v);
do {
char *content;
gboolean match;
@@ -3514,6 +3514,8 @@ sheet_widget_list_base_set_selection_value (SheetWidgetListBase *swl, GnmValue *
}
i++;
} while (gtk_tree_model_iter_next (swl->model, &iter));
+ g_free (str);
+ }
if (swl->selection != selection) {
swl->selection = selection;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]