2006-01-10 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-info.c: Remove FIXME, we do not have to free the attr fields according to the example in the email available at mail.gnome.org/archives/desktop-devel-list/2004-May/msg00230.html. Conversely, we do have to free 'name', so we do so, fixing a leak. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1311 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2006-01-10 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
|
* gnome/applet/applet-dbus-info.c: Remove FIXME, we do not have to free
|
||||||
|
the attr fields according to the example in the email available at
|
||||||
|
mail.gnome.org/archives/desktop-devel-list/2004-May/msg00230.html.
|
||||||
|
Conversely, we do have to free 'name', so we do so, fixing a leak.
|
||||||
|
|
||||||
2006-01-10 Robert Love <rml@novell.com>
|
2006-01-10 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
* src/nm-device-802-11-wireless.c, src/nm-device-802-3-ethernet.c: Make
|
* src/nm-device-802-11-wireless.c, src/nm-device-802-3-ethernet.c: Make
|
||||||
|
@@ -840,13 +840,10 @@ nmi_save_network_info (NMWirelessApplet *applet,
|
|||||||
const char *bssid,
|
const char *bssid,
|
||||||
NMGConfWSO * gconf_wso)
|
NMGConfWSO * gconf_wso)
|
||||||
{
|
{
|
||||||
GnomeKeyringAttributeList * attributes;
|
|
||||||
GnomeKeyringAttribute attr;
|
|
||||||
char * key;
|
char * key;
|
||||||
GConfEntry * gconf_entry;
|
GConfEntry * gconf_entry;
|
||||||
char * escaped_network;
|
char * escaped_network;
|
||||||
GnomeKeyringResult ret;
|
GnomeKeyringResult ret;
|
||||||
const char * name;
|
|
||||||
guint32 item_id;
|
guint32 item_id;
|
||||||
|
|
||||||
g_return_if_fail (applet != NULL);
|
g_return_if_fail (applet != NULL);
|
||||||
@@ -930,10 +927,14 @@ nmi_save_network_info (NMWirelessApplet *applet,
|
|||||||
/* Stuff the encryption key into the keyring */
|
/* Stuff the encryption key into the keyring */
|
||||||
if (nm_gconf_wso_get_we_cipher (gconf_wso) != IW_AUTH_CIPHER_NONE)
|
if (nm_gconf_wso_get_we_cipher (gconf_wso) != IW_AUTH_CIPHER_NONE)
|
||||||
{
|
{
|
||||||
/* Setup a request to the keyring to save the network passphrase */
|
GnomeKeyringAttributeList *attributes;
|
||||||
|
GnomeKeyringAttribute attr;
|
||||||
|
char *name;
|
||||||
|
|
||||||
name = g_strdup_printf (_("Passphrase for wireless network %s"), essid);
|
name = g_strdup_printf (_("Passphrase for wireless network %s"), essid);
|
||||||
|
|
||||||
attributes = gnome_keyring_attribute_list_new ();
|
attributes = gnome_keyring_attribute_list_new ();
|
||||||
attr.name = g_strdup ("essid"); /* FIXME: Do we need to free this ? */
|
attr.name = g_strdup ("essid");
|
||||||
attr.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
|
attr.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
|
||||||
attr.value.string = g_strdup (essid);
|
attr.value.string = g_strdup (essid);
|
||||||
g_array_append_val (attributes, attr);
|
g_array_append_val (attributes, attr);
|
||||||
@@ -948,6 +949,7 @@ nmi_save_network_info (NMWirelessApplet *applet,
|
|||||||
if (ret != GNOME_KEYRING_RESULT_OK)
|
if (ret != GNOME_KEYRING_RESULT_OK)
|
||||||
g_warning ("Error saving passphrase in keyring. Ret=%d", ret);
|
g_warning ("Error saving passphrase in keyring. Ret=%d", ret);
|
||||||
|
|
||||||
|
g_free (name);
|
||||||
gnome_keyring_attribute_list_free (attributes);
|
gnome_keyring_attribute_list_free (attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user