summaryrefslogtreecommitdiff
path: root/client/gdaemonfile.c
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-11-03 22:49:42 +0000
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-11-04 21:53:39 +0000
commit7757c2bcfef808c860ec0e8676d69301a0f821d1 (patch)
tree5495ae987962aff70af874254d0f0cdfabd7909e /client/gdaemonfile.c
parentb970e280ab17d25cd2079ca658abb54248f8f098 (diff)
downloadgvfs-7757c2bcfef808c860ec0e8676d69301a0f821d1.tar.gz
client: Fix up error handling in find_enclosing_mount
2a0dc68c7eeb ("client: Remove inconsistencies between async and sync variants") introduced a regression which causes find_enclosing_mount to segfault if a non-NULL GError** is passed in. Fix this. Also, only call g_dbus_error_strip_remote_error () on GErrors that have come from dbus. https://bugzilla.gnome.org/show_bug.cgi?id=739075
Diffstat (limited to 'client/gdaemonfile.c')
-rw-r--r--client/gdaemonfile.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 69104c5e..33733411 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -2279,8 +2279,11 @@ g_daemon_file_find_enclosing_mount (GFile *file,
cancellable,
error);
- if (error)
- goto out;
+ if (error && *error)
+ {
+ g_dbus_error_strip_remote_error (*error);
+ return NULL;
+ }
if (mount_info == NULL)
{
@@ -2288,7 +2291,7 @@ g_daemon_file_find_enclosing_mount (GFile *file,
G_IO_ERROR_FAILED,
"Internal error: \"%s\"",
"No error but no mount info from g_daemon_vfs_get_mount_info_sync");
- goto out;
+ return NULL;
}
if (mount_info->user_visible)
@@ -2310,10 +2313,6 @@ g_daemon_file_find_enclosing_mount (GFile *file,
corresponding to a particular path/uri */
_("Could not find enclosing mount"));
-out:
- if (error && *error)
- g_dbus_error_strip_remote_error (*error);
-
return NULL;
}