[Spice-commits] src/channel-display.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 31 09:29:19 UTC 2019
src/channel-display.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 0c52ce8937c849d8ae32ade1f22ce3a48c56c732
Author: Victor Toso <me at victortoso.com>
Date: Thu Oct 31 00:17:50 2019 +0100
display: remove dangling pointer
It just holds a reference to the primary surface which is being
removed and freed from the hash table. This ends up generating a
warning below in the same function before setting the new primary
surface reference.
Signed-off-by: Victor Toso <victortoso at redhat.com>
diff --git a/src/channel-display.c b/src/channel-display.c
index cd87c7c..4cb6532 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -1001,6 +1001,7 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface)
g_coroutine_signal_emit(channel, signals[SPICE_DISPLAY_PRIMARY_DESTROY], 0);
g_hash_table_remove(c->surfaces, GINT_TO_POINTER(c->primary->surface_id));
+ c->primary = NULL;
}
CHANNEL_DEBUG(channel, "Create primary canvas");
More information about the Spice-commits
mailing list