summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2009-02-03 11:32:18 +0000
committerBastien Nocera <hadess@src.gnome.org>2009-02-03 11:32:18 +0000
commitfca96a55b11809719a247bc02d744aee31826733 (patch)
tree5b073a8a24a82687d6b09106a8df37caf1d558c8
parent534c3bd6e6475b4ef7ebcd041d3cf45d3f0df7cb (diff)
downloadgvfs-fca96a55b11809719a247bc02d744aee31826733.tar.gz
Fix possible double-free when the display name is freed Avoid errors when
2009-02-03 Bastien Nocera <hadess@hadess.net> * daemon/gvfsbackendobexftp.c (do_mount): Fix possible double-free when the display name is freed Avoid errors when the icon name couldn't be gathered svn path=/trunk/; revision=2193
-rw-r--r--ChangeLog6
-rw-r--r--daemon/gvfsbackendobexftp.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 77b4571c..c430339c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-03 Bastien Nocera <hadess@hadess.net>
+
+ * daemon/gvfsbackendobexftp.c (do_mount): Fix
+ possible double-free when the display name is freed
+ Avoid errors when the icon name couldn't be gathered
+
2009-02-02 Alexander Larsson <alexl@redhat.com>
* configure.ac:
diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c
index 60398eb6..2c457f9f 100644
--- a/daemon/gvfsbackendobexftp.c
+++ b/daemon/gvfsbackendobexftp.c
@@ -882,7 +882,9 @@ do_mount (GVfsBackend *backend,
}
op_backend->display_name = _get_bluetooth_device_properties (op_backend->bdaddr, &op_backend->icon_name);
if (!op_backend->display_name)
- op_backend->display_name = g_strdelimit (op_backend->bdaddr, ":", '-');
+ op_backend->display_name = g_strdelimit (g_strdup (op_backend->bdaddr), ":", '-');
+ if (!op_backend->icon_name)
+ op_backend->icon_name = g_strdup ("bluetooth");
g_print (" do_mount: %s (%s) mounted\n", op_backend->display_name, op_backend->bdaddr);
}
else