gnome-bluetooth r406 - trunk/wizard
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-bluetooth r406 - trunk/wizard
- Date: Sat, 28 Feb 2009 13:12:44 +0000 (UTC)
Author: hadess
Date: Sat Feb 28 13:12:43 2009
New Revision: 406
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=406&view=rev
Log:
Fix small memleak
And avoid duplicating a string when a reassignment is enough.
Modified:
trunk/wizard/main.c
Modified: trunk/wizard/main.c
==============================================================================
--- trunk/wizard/main.c (original)
+++ trunk/wizard/main.c Sat Feb 28 13:12:43 2009
@@ -543,8 +543,7 @@
GtkWidget *entry_custom;
char *oldpin;
- oldpin = g_strdup (user_pincode);
- g_free (user_pincode);
+ oldpin = user_pincode;
user_pincode = NULL;
dialog = gtk_dialog_new_with_buttons (_("Passkey options"),
@@ -642,10 +641,12 @@
gtk_widget_show_all (vbox);
- if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT) {
+ g_free (user_pincode);
user_pincode = oldpin;
- else
+ } else {
g_free (oldpin);
+ }
gtk_widget_destroy (dialog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]