[Spice-commits] server/reds.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Oct 18 09:16:22 UTC 2016


 server/reds.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 530b22b7ec99e78f063480981f4abffa25571a29
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sun May 15 17:12:01 2016 +0100

    Be consistent with opaque type
    
    vdi_port_read_buf_release is registered passing data as
    RedVDIReadBuf*, not RedPipeItem*. Cast opaque to proper
    pointer type to avoid the assumption that first field of
    RedVDIReadBuf is a RedPipeItem.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/reds.c b/server/reds.c
index 79f9c9e..a71029f 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -745,7 +745,8 @@ static void reds_agent_remove(RedsState *reds)
 
 static void vdi_port_read_buf_release(uint8_t *data, void *opaque)
 {
-    red_pipe_item_unref((RedPipeItem *)opaque);
+    RedVDIReadBuf *read_buf = (RedVDIReadBuf *)opaque;
+    red_pipe_item_unref(&read_buf->base);
 }
 
 /*


More information about the Spice-commits mailing list