On Wed, Mar 27, 2013 at 03:59:26PM +0100, Marc-André Lureau wrote: > On Wed, Mar 27, 2013 at 3:53 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: > > + if (c->conn) { > > + g_object_unref(c->conn); > > + c->sock = NULL; > > + c->conn = NULL; > > + } > > if (c->sock) { > > g_object_unref(c->sock); > > c->sock = NULL; > > Can we remove the if (c->sock) block below? I've kept it because of the if (spice_session_get_client_provided_socket(c->session)) { if (!(c->sock = g_socket_new_from_fd(c->fd, NULL))) { CHANNEL_DEBUG(channel, "Failed to open socket from fd %d", c->fd); emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_CONNECT); goto cleanup; } g_socket_set_blocking(c->sock, FALSE); g_socket_set_keepalive(c->sock, TRUE); goto connected; } } codepath in spice_channel_coroutine(). I can indeed add a g_object_ref() where g_socket_connection_get_socket() is called and remove the c->sock = NULL; bit from if (c->conn){} Christophe
Attachment:
pgpf5VrtbfAmr.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel