gnome-panel r10972 - trunk/applets/clock



Author: vuntz
Date: Wed Apr  2 16:08:34 2008
New Revision: 10972
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=10972&view=rev

Log:
2008-04-02  Vincent Untz  <vuntz gnome org>

	* set-timezone.c: (can_do): initialize variables at the beginning of
	the function, so that we don't crash because of unitiliazed variables
	after a goto.
	Should fix bug #522538, bug #523643.


Modified:
   trunk/applets/clock/ChangeLog
   trunk/applets/clock/set-timezone.c

Modified: trunk/applets/clock/set-timezone.c
==============================================================================
--- trunk/applets/clock/set-timezone.c	(original)
+++ trunk/applets/clock/set-timezone.c	Wed Apr  2 16:08:34 2008
@@ -139,6 +139,9 @@
         DBusError dbus_error;
 	gint res = 0;
 
+        pk_caller = NULL;
+        pk_action = NULL;
+
 	system_bus = dbus_g_connection_get_connection (get_system_bus ());
 	if (system_bus == NULL)
 		goto out;
@@ -147,9 +150,6 @@
 	if (pk_context == NULL)
 		goto out;
 	
-        pk_caller = NULL;
-        pk_action = NULL;
-
         pk_action = polkit_action_new ();
         polkit_action_set_action_id (pk_action, pk_action_id);
 



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