qemu-kvm/kvm-Revert-ui-clipboard-Don-t-use-g_autoptr-just-to-free.patch
Miroslav Rezanina 4d1d207d61 * Thu Feb 24 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-10
- kvm-Revert-ui-clipboard-Don-t-use-g_autoptr-just-to-free.patch [bz#2042820]
- kvm-ui-avoid-compiler-warnings-from-unused-clipboard-inf.patch [bz#2042820]
- kvm-ui-clipboard-fix-use-after-free-regression.patch [bz#2042820]
- kvm-ui-vnc.c-Fixed-a-deadlock-bug.patch [bz#2042820]
- kvm-memory-Fix-incorrect-calls-of-log_global_start-stop.patch [bz#2044818]
- kvm-memory-Fix-qemu-crash-on-starting-dirty-log-twice-wi.patch [bz#2044818]
- Resolves: bz#2042820
  (qemu crash when try to copy and paste contents from client to VM)
- Resolves: bz#2044818
  (Qemu Core Dumped when migrate -> migrate_cancel -> migrate again during guest is paused)
2022-02-24 01:48:49 -05:00

46 lines
1.5 KiB
Diff

From 213d2c6d3138f3570bca36edaacfd1ee86b18967 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 4 Feb 2022 06:45:51 +0100
Subject: [PATCH 1/6] Revert "ui/clipboard: Don't use g_autoptr just to free a
variable"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
RH-MergeRequest: 75: fix vnc cut+paste crash
RH-Commit: [1/4] 0937d15054ad6e902bc22d1872231504f442ddcc (kraxel/centos-qemu-kvm)
RH-Bugzilla: 2042820
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
This reverts commit 8df1ea81ee6c674522967d056daa8d3748fa3883.
---
ui/clipboard.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ui/clipboard.c b/ui/clipboard.c
index d53576b0f6..d7b008d62a 100644
--- a/ui/clipboard.c
+++ b/ui/clipboard.c
@@ -44,14 +44,13 @@ void qemu_clipboard_peer_release(QemuClipboardPeer *peer,
void qemu_clipboard_update(QemuClipboardInfo *info)
{
- QemuClipboardInfo *old = NULL;
+ g_autoptr(QemuClipboardInfo) old = NULL;
assert(info->selection < QEMU_CLIPBOARD_SELECTION__COUNT);
notifier_list_notify(&clipboard_notifiers, info);
old = cbinfo[info->selection];
cbinfo[info->selection] = qemu_clipboard_info_ref(info);
- g_free(old);
}
QemuClipboardInfo *qemu_clipboard_info(QemuClipboardSelection selection)
--
2.27.0