From 2153d300f24d3388d7c4ab75a55451ad5a581b5a Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Mon, 25 Aug 2014 14:18:21 +0100 Subject: ftp: Don't unlock unlocked mutex Don't unlock an unlocked mutex since this causes an abort() with the latest glib (and is undefined anyway). https://bugzilla.gnome.org/show_bug.cgi?id=735381 --- daemon/gvfsftptask.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'daemon/gvfsftptask.c') diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c index 068edd83..d78e0d5f 100644 --- a/daemon/gvfsftptask.c +++ b/daemon/gvfsftptask.c @@ -232,7 +232,7 @@ g_vfs_ftp_task_acquire_connection (GVfsFtpTask *task) g_vfs_ftp_task_login (task, ftp->user, ftp->password); g_vfs_ftp_task_setup_connection (task); if (G_LIKELY (!g_vfs_ftp_task_is_in_error (task))) - break; + goto out_unlocked; g_vfs_ftp_connection_free (task->conn); task->conn = NULL; @@ -269,8 +269,9 @@ g_vfs_ftp_task_acquire_connection (GVfsFtpTask *task) break; } } - g_cancellable_disconnect (task->cancellable, id); g_mutex_unlock (&ftp->mutex); +out_unlocked: + g_cancellable_disconnect (task->cancellable, id); return task->conn != NULL; } -- cgit v1.2.1