summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/gmountspec.c2
-rw-r--r--common/gvfsdaemonprotocol.c13
-rw-r--r--daemon/gvfsafpconnection.c2
3 files changed, 13 insertions, 4 deletions
diff --git a/common/gmountspec.c b/common/gmountspec.c
index 1e34d791..ac9b66cd 100644
--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -494,7 +494,7 @@ g_mount_spec_new_from_string (const gchar *str,
item.value = g_uri_unescape_string (tokens[1], NULL);
if (strcmp (tokens[0], "prefix") == 0)
{
- g_free (item.key);
+ g_free (mount_prefix);
mount_prefix = item.value;
}
else
diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c
index a77e9962..6485854e 100644
--- a/common/gvfsdaemonprotocol.c
+++ b/common/gvfsdaemonprotocol.c
@@ -277,6 +277,8 @@ _g_dbus_get_file_attribute (GVariant *value,
else if (g_variant_is_container (v))
{
*type = G_FILE_ATTRIBUTE_TYPE_OBJECT;
+ obj_type = G_MAXUINT32; /* treat it as an error if not set below */
+ str = NULL;
if (g_variant_is_of_type (v, G_VARIANT_TYPE ("(u)")))
{
@@ -292,8 +294,15 @@ _g_dbus_get_file_attribute (GVariant *value,
/* obj_type 1 and 2 are deprecated and treated as errors */
if (obj_type == 3)
{
- /* serialized G_ICON */
- obj = (GObject *)g_icon_new_for_string (str, NULL);
+ if (str != NULL)
+ {
+ /* serialized G_ICON */
+ obj = (GObject *)g_icon_new_for_string (str, NULL);
+ }
+ else
+ {
+ g_warning ("Malformed object data in file attribute");
+ }
}
else
{
diff --git a/daemon/gvfsafpconnection.c b/daemon/gvfsafpconnection.c
index 5233270c..58291f83 100644
--- a/daemon/gvfsafpconnection.c
+++ b/daemon/gvfsafpconnection.c
@@ -1774,7 +1774,7 @@ open_thread_func (gpointer user_data)
GSocketClient *client;
guint16 req_id;
- gboolean res;
+ gboolean res = FALSE;
char *reply;
DSIHeader dsi_header;
guint pos;