summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-05-15 17:12:01 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-10-18 10:15:57 +0100
commit530b22b7ec99e78f063480981f4abffa25571a29 (patch)
tree09860aba4818f3bf2965755b076ba6e57aa2c4fa
parent5feb1d03797a5692e218853b0b3941cb6ba0ae11 (diff)
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@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rw-r--r--server/reds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index 79f9c9e8..a71029f2 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);
}
/*