[Spice-commits] server/cursor-channel.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Wed Aug 23 07:56:38 UTC 2017

 server/cursor-channel.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7498675c1d695bb68df6cf9d06b2ed9bf0619080
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date:   Tue Aug 22 15:44:58 2017 -0500

    Avoid leaking memory on invalid cursor commands
    When a RedCursorCmd is passed to cursor_channel_process_cmd(), it
    constructs a new CursorItem which takes ownership of that command. If
    the cursor_cmd->type falls through to the default case of the switch
    statement, we will print a warning and return without freeing the
    CursorItem (and thus the RedCursorCmd).
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index a8761133..63d6886d 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -335,6 +335,7 @@ void cursor_channel_process_cmd(CursorChannel *cursor, RedCursorCmd *cursor_cmd)
         spice_warning("invalid cursor command %u", cursor_cmd->type);
+        cursor_item_unref(cursor_item);

More information about the Spice-commits mailing list