qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 248c50: ui/vdagent: fix leak on error path


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 248c50: ui/vdagent: fix leak on error path
Date: Tue, 31 Aug 2021 06:38:44 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 248c50b2bd31ab7bb8220cd1d7eca3a0d6463aa7
      
https://github.com/qemu/qemu/commit/248c50b2bd31ab7bb8220cd1d7eca3a0d6463aa7
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/clipboard.h
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: fix leak on error path

"info" was leaked when more than 10 entries.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-2-marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: e7c55746f1eab99429ac1505536f3bbcab20df8f
      
https://github.com/qemu/qemu/commit/e7c55746f1eab99429ac1505536f3bbcab20df8f
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: remove copy-pasta comment

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-3-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: c311e8d7ff62ddabd474898815e8c122c484a88c
      
https://github.com/qemu/qemu/commit/c311e8d7ff62ddabd474898815e8c122c484a88c
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/gtk-clipboard.c

  Log Message:
  -----------
  ui/gtk-clipboard: use existing macros

Hardcoding strings is error prone, use dedicated macros instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-4-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 6b32aef09a7d592491a8e25ce1714cb0503a3d6e
      
https://github.com/qemu/qemu/commit/6b32aef09a7d592491a8e25ce1714cb0503a3d6e
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/gtk-clipboard.c

  Log Message:
  -----------
  ui/gtk-clipboard: fix clipboard enum typo

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-5-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 684e64d36d139c1473dd029661c20ba968c0fe53
      
https://github.com/qemu/qemu/commit/684e64d36d139c1473dd029661c20ba968c0fe53
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/clipboard.h
    M ui/clipboard.c

  Log Message:
  -----------
  ui/clipboard: add helper to retrieve current clipboard

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-6-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 482bbaf4776d223971ec68ddd4d31d8861d31f1c
      
https://github.com/qemu/qemu/commit/482bbaf4776d223971ec68ddd4d31d8861d31f1c
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/clipboard.h
    M ui/clipboard.c

  Log Message:
  -----------
  ui/clipboard: add qemu_clipboard_peer_owns() helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-7-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 1387865eca16984fc6d57702ac9e999527681b22
      
https://github.com/qemu/qemu/commit/1387865eca16984fc6d57702ac9e999527681b22
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/clipboard.h
    M ui/clipboard.c

  Log Message:
  -----------
  ui/clipboard: add qemu_clipboard_peer_release() helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-8-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 7424bfaa99b629e243bf05debd3eeb69c1dd670f
      
https://github.com/qemu/qemu/commit/7424bfaa99b629e243bf05debd3eeb69c1dd670f
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/clipboard.c

  Log Message:
  -----------
  ui/clipboard: release owned grabs on unregister

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-9-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 5e0a24e8685892f52826567b216fe34f98bc9d58
      
https://github.com/qemu/qemu/commit/5e0a24e8685892f52826567b216fe34f98bc9d58
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: disconnect handlers and reset state on finalize

Avoid handlers being called with dangling pointers when the object is
freed.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-10-marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 5fb2e8d99bdba89efeaae7d9752a6edb7b3f4ce7
      
https://github.com/qemu/qemu/commit/5fb2e8d99bdba89efeaae7d9752a6edb7b3f4ce7
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: reset outbuf on disconnect

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-11-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 3b99bb4c3ae2cdc445defa243988ceebc7a8378b
      
https://github.com/qemu/qemu/commit/3b99bb4c3ae2cdc445defa243988ceebc7a8378b
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: split clipboard recv message handling

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-12-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: c98c50de7c4de5f90e978b54b400480689eb2455
      
https://github.com/qemu/qemu/commit/c98c50de7c4de5f90e978b54b400480689eb2455
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: use qemu_clipboard_peer_release helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-13-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: d2ed2c01c20d739f0ffaa7b178f9020c7ab880b4
      
https://github.com/qemu/qemu/commit/d2ed2c01c20d739f0ffaa7b178f9020c7ab880b4
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: use qemu_clipboard_info helper

The clipboard unit now tracks the current clipboard grab, no need to
duplicate this work.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-14-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 3d3f0bc3f7d5d74a7ae14f7336c9c3c209cdb71b
      
https://github.com/qemu/qemu/commit/3d3f0bc3f7d5d74a7ae14f7336c9c3c209cdb71b
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/trace-events
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: send empty clipboard when unhandled

Rather than leaving the agent timing out or hanging, reply to it with an
empty result.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-15-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: b702c863bfaf590e00e3cc9d599f3bbdd955d099
      
https://github.com/qemu/qemu/commit/b702c863bfaf590e00e3cc9d599f3bbdd955d099
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/gtk.h
    M ui/gtk-clipboard.c

  Log Message:
  -----------
  ui/gtk-clipboard: use qemu_clipboard_info helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-16-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 314bf50086d8b7d057f980cb1cd6ed5c87640980
      
https://github.com/qemu/qemu/commit/314bf50086d8b7d057f980cb1cd6ed5c87640980
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: send release when no clipboard owner

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-17-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 8038c5b64649b2d8ed9bf3dd7fac4bb2536524c6
      
https://github.com/qemu/qemu/commit/8038c5b64649b2d8ed9bf3dd7fac4bb2536524c6
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/gtk-clipboard.c

  Log Message:
  -----------
  ui/gtk-clipboard: emit release clipboard events

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-18-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 90208bc9657b7e0f8a6bc6af82b69c65c97b2d64
      
https://github.com/qemu/qemu/commit/90208bc9657b7e0f8a6bc6af82b69c65c97b2d64
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M ui/vdagent.c

  Log Message:
  -----------
  ui/vdagent: add a migration blocker

The current implementation lacks migration support. After migration,
vdagent support will be broken (even after a restart of the daemons).
Let's try to fix it in 6.2.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-19-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: d52dff5d8048d4982437db9606c27bb4127cf9d0
      
https://github.com/qemu/qemu/commit/d52dff5d8048d4982437db9606c27bb4127cf9d0
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M include/ui/clipboard.h
    M include/ui/gtk.h
    M ui/clipboard.c
    M ui/gtk-clipboard.c
    M ui/trace-events
    M ui/vdagent.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/marcandre/tags/clip-pull-request' into 
staging

# gpg: Signature made Tue 31 Aug 2021 14:29:27 BST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" 
[full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" 
[full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/marcandre/tags/clip-pull-request:
  ui/vdagent: add a migration blocker
  ui/gtk-clipboard: emit release clipboard events
  ui/vdagent: send release when no clipboard owner
  ui/gtk-clipboard: use qemu_clipboard_info helper
  ui/vdagent: send empty clipboard when unhandled
  ui/vdagent: use qemu_clipboard_info helper
  ui/vdagent: use qemu_clipboard_peer_release helper
  ui/vdagent: split clipboard recv message handling
  ui/vdagent: reset outbuf on disconnect
  ui/vdagent: disconnect handlers and reset state on finalize
  ui/clipboard: release owned grabs on unregister
  ui/clipboard: add qemu_clipboard_peer_release() helper
  ui/clipboard: add qemu_clipboard_peer_owns() helper
  ui/clipboard: add helper to retrieve current clipboard
  ui/gtk-clipboard: fix clipboard enum typo
  ui/gtk-clipboard: use existing macros
  ui/vdagent: remove copy-pasta comment
  ui/vdagent: fix leak on error path

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/ad22d0583300...d52dff5d8048



reply via email to

[Prev in Thread] Current Thread [Next in Thread]