summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-06-11 11:13:06 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2012-06-11 11:13:06 +0200
commite463f252f1c474cb36019b794e6aa41aa7028d10 (patch)
treef4f09228bd588a50a8014c404e55d72555201482
parentb65b510ef88f41b3bdd986d98f4cf538d7dd3817 (diff)
spice_channel_coroutine: fix function exit in error path
spice_channel_coroutine returns a void *, but one of its error path is doing 'return FALSE'. This commit replaces this return with a 'goto cleanup' since this is what is done in the other error paths.
-rw-r--r--gtk/spice-channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index fd63ca0..851fc23 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2107,7 +2107,7 @@ static void *spice_channel_coroutine(void *data)
if (!(c->sock = g_socket_new_from_fd(c->fd, NULL))) {
SPICE_DEBUG("Failed to open socket from fd %d", c->fd);
emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_CONNECT);
- return FALSE;
+ goto cleanup;
}
g_socket_set_blocking(c->sock, FALSE);