[gnome-bluetooth/gnome-2-32] wizard: fix memleak



commit 9db18fb46570849e86d437ac4d2f24c40a3693c0
Author: Daniele Forsi <dforsi src gnome org>
Date:   Mon Nov 21 15:49:57 2011 +0100

    wizard: fix memleak
    
    Common usage is freeing just before strdup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=664478

 wizard/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index ce430dc..d1692e9 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -683,6 +683,7 @@ entry_custom_event (GtkWidget *entry, GdkEventKey *event)
 void
 entry_custom_changed (GtkWidget *entry)
 {
+	g_free (user_pincode);
 	user_pincode = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
 	gtk_dialog_set_response_sensitive (GTK_DIALOG (pin_dialog),
 					   GTK_RESPONSE_ACCEPT,



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