[evolution/gnome-43] I#2047 - Fix possible memory leak in e_table_state_load_from_node()



commit 7a497317217911894cf835f68dd7ade022ab3cc8
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 27 13:48:23 2022 +0200

    I#2047 - Fix possible memory leak in e_table_state_load_from_node()
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2047

 src/e-util/e-table-state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/e-util/e-table-state.c b/src/e-util/e-table-state.c
index 2a3438f905..6458a4ff30 100644
--- a/src/e-util/e-table-state.c
+++ b/src/e-util/e-table-state.c
@@ -527,13 +527,14 @@ e_table_state_load_from_node (ETableState *state,
        children = node->xmlChildrenNode;
        for (; children; children = children->next) {
                if (!strcmp ((gchar *) children->name, "column")) {
-                       int_and_double *column_info = g_new (int_and_double, 1);
+                       int_and_double *column_info;
                        gint column_source;
 
                        column_source = e_xml_get_integer_prop_by_name (children, (const guchar *) "source");
                        if (column_source < 0 || column_source >= columns->len)
                                continue;
 
+                       column_info = g_new (int_and_double, 1);
                        column_info->column = column_source;
                        column_info->expansion =
                                e_xml_get_double_prop_by_name_with_default (


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]