diff options
author | Nalin Dahyabhai <nalin@src.gnome.org> | 2002-05-29 00:27:24 +0000 |
---|---|---|
committer | Nalin Dahyabhai <nalin@src.gnome.org> | 2002-05-29 00:27:24 +0000 |
commit | c3285ec2305e3c524bb06fa1a31267c20aafa16b (patch) | |
tree | 45cdc10e096526c814dfffdefef2f035d90baafb | |
parent | c8cd575e5ccd8a246562cc1d14d94aaf3fdeb4f0 (diff) |
Always free the segment when freeing arrays and strings.vte_0_3_22
* src/vte.c, src/vteaccess.c: Always free the segment when freeing arrays and
strings.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/vte.c | 11 | ||||
-rw-r--r-- | src/vteaccess.c | 8 | ||||
-rw-r--r-- | vte.spec | 5 |
4 files changed, 16 insertions, 10 deletions
@@ -3,6 +3,8 @@ background updating (report from Richard Neal Plana). Fix cb() and ce() when the cursor is on a line without data (needed to create it) and when cells being cleared don't exist (needed to create them). + * src/vte.c, src/vteaccess.c: Always free the segment when freeing + arrays and strings. 2002-05-24 nalin * autogen.sh: Call libtoolize. (#82836) @@ -326,7 +326,7 @@ static void vte_free_row_data(gpointer freeing, gpointer data) { if (freeing) { - g_array_free((GArray*)freeing, FALSE); + g_array_free((GArray*)freeing, TRUE); } } @@ -696,7 +696,7 @@ vte_terminal_match_contents_clear(VteTerminal *terminal) terminal->pvt->match_contents = NULL;; } while (terminal->pvt->match_attributes != NULL) { - g_array_free(terminal->pvt->match_attributes, FALSE); + g_array_free(terminal->pvt->match_attributes, TRUE); terminal->pvt->match_attributes = NULL; } vte_terminal_match_hilite_clear(terminal); @@ -6122,6 +6122,7 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event) vte_terminal_send(terminal, "UTF-8", special, strlen(special)); g_free(special); + g_free(normal); } /* Keep the cursor on-screen. */ if (!scrolled && !modifier && @@ -6813,7 +6814,7 @@ vte_terminal_get_text(VteTerminal *terminal, } while (pcell != NULL); } ret = g_strdup(string->str); - g_string_free(string, FALSE); + g_string_free(string, TRUE); return ret; } @@ -8378,7 +8379,7 @@ vte_terminal_finalize(GObject *object) } /* Free the word chars array. */ - g_array_free(terminal->pvt->word_chars, FALSE); + g_array_free(terminal->pvt->word_chars, TRUE); /* Call the inherited finalize() method. */ if (G_OBJECT_CLASS(widget_class)->finalize) { @@ -10681,7 +10682,7 @@ vte_terminal_set_word_chars(VteTerminal *terminal, const char *spec) g_return_if_fail(VTE_IS_TERMINAL(terminal)); /* Allocate a new range array. */ if (terminal->pvt->word_chars != NULL) { - g_array_free(terminal->pvt->word_chars, FALSE); + g_array_free(terminal->pvt->word_chars, TRUE); } terminal->pvt->word_chars = g_array_new(FALSE, TRUE, sizeof(VteWordCharRange)); diff --git a/src/vteaccess.c b/src/vteaccess.c index 4917922..31f9b38 100644 --- a/src/vteaccess.c +++ b/src/vteaccess.c @@ -75,11 +75,11 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text) priv->snapshot = NULL; } if (priv->snapshot_cells != NULL) { - g_array_free(priv->snapshot_cells, FALSE); + g_array_free(priv->snapshot_cells, TRUE); priv->snapshot_cells = NULL; } if (priv->snapshot_linebreaks != NULL) { - g_array_free(priv->snapshot_linebreaks, FALSE); + g_array_free(priv->snapshot_linebreaks, TRUE); priv->snapshot_linebreaks = NULL; } priv->snapshot_caret = 0; @@ -148,11 +148,11 @@ vte_terminal_accessible_free_private_data(VteTerminalAccessiblePrivate *priv) priv->snapshot = NULL; } if (priv->snapshot_cells != NULL) { - g_array_free(priv->snapshot_cells, FALSE); + g_array_free(priv->snapshot_cells, TRUE); priv->snapshot_cells = NULL; } if (priv->snapshot_linebreaks != NULL) { - g_array_free(priv->snapshot_linebreaks, FALSE); + g_array_free(priv->snapshot_linebreaks, TRUE); priv->snapshot_linebreaks = NULL; } g_free(priv); @@ -1,5 +1,5 @@ Name: vte -Version: 0.3.21 +Version: 0.3.22 Release: 1 Summary: An experimental terminal emulator. License: LGPL @@ -53,6 +53,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %{_libdir}/pkgconfig/* %changelog +* Tue May 28 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.22-1 +- plug some memory leaks + * Tue May 28 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.21-1 - fix matching, fix async background updates |