summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/vte.c11
-rw-r--r--src/vteaccess.c8
-rw-r--r--vte.spec5
4 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e4957b..1b9b388 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)
diff --git a/src/vte.c b/src/vte.c
index 09fc65f..c5aa7c0 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -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);
diff --git a/vte.spec b/vte.spec
index 2d41080..118bbae 100644
--- a/vte.spec
+++ b/vte.spec
@@ -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