summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-20 00:36:50 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-20 00:36:50 +0000
commit3c9b743870a524151d31de2c0d758fa7da7ffed6 (patch)
treefd871b887244f31a6c1d0e7a96d2505e08d7c4e5 /mixgtk
parentfd956f0805110d3fbfc3450d815d6b0946c16e9d (diff)
downloadmdk-3c9b743870a524151d31de2c0d758fa7da7ffed6.tar.gz
mdk-3c9b743870a524151d31de2c0d758fa7da7ffed6.tar.bz2
memory leak fixed
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk_fontsel.c4
-rw-r--r--mixgtk/mixgtk_mixvm.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c
index 7a9b33e..1a52532 100644
--- a/mixgtk/mixgtk_fontsel.c
+++ b/mixgtk/mixgtk_fontsel.c
@@ -114,6 +114,7 @@ mixgtk_fontsel_load_defaults (void)
infos_[i].widget =
mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]);
g_assert (infos_[i].widget != NULL);
+ if (infos_[i].style) gtk_style_unref (infos_[i].style);
infos_[i].style = gtk_style_copy
(gtk_widget_get_style (infos_[i].widget));
gtk_widget_set_style (infos_[i].widget, infos_[i].style);
@@ -208,9 +209,10 @@ on_devices_font_activate (void)
void
on_fontsel_apply_clicked (void)
{
- const gchar * name = gtk_font_selection_dialog_get_font_name
+ gchar * name = gtk_font_selection_dialog_get_font_name
(GTK_FONT_SELECTION_DIALOG (fontsel_dialog_));
mixgtk_fontsel_set (widget_, name);
+ g_free (name);
}
void
diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c
index f929be1..f492110 100644
--- a/mixgtk/mixgtk_mixvm.c
+++ b/mixgtk/mixgtk_mixvm.c
@@ -32,7 +32,7 @@
#define REGISTER_NO_ (MIXGTK_WIDGET_rI6 - MIXGTK_WIDGET_rA + 1)
static GtkEntry *reg_entries_[REGISTER_NO_];
-static GtkTooltips *tips_;
+static GtkTooltips *tips_ = NULL;
static GtkEntry *loc_entry_;
static GtkWidget *goto_ = NULL;
static GtkEntry *goto_entry_ = NULL;
@@ -119,7 +119,7 @@ mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top)
g_return_val_if_fail (vm != NULL, FALSE);
vm_ = vm;
- tips_ = gtk_tooltips_new ();
+ if (!tips_) tips_ = gtk_tooltips_new ();
for (k = 0; k < REGISTER_NO_; ++k)
{