]> git.proxmox.com Git - mirror_qemu.git/commit
ui/cocoa: Fix clipboard text release
authorAkihiko Odaki <akihiko.odaki@gmail.com>
Tue, 14 Jun 2022 21:21:31 +0000 (06:21 +0900)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 1 Jul 2022 10:35:47 +0000 (12:35 +0200)
commit8c0d80245f3cdbbe6003844751d8fc6b1db7b1e4
tree7e7dbead503452400af82096618c4da442d5f179
parent839a482695616c87c7663062f60b7afe48d023a7
ui/cocoa: Fix clipboard text release

[-NSPasteboard dataForType:] returns an autoreleased NSString,
and callings its release method will result in double-free when
the global autorelease pool is released. Use NSAutoreleasePool to
release it properly.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220614212131.94696-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/cocoa.m