On Wed, Jul 16, 2025 at 06:07:31PM +0300, Michael Tokarev wrote: > On 15.07.2025 09:32, marcandre.lur...@redhat.com wrote: > > From: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp> > > > > vnc_worker_thread_loop() copies z_stream stored in its local VncState to > > the persistent VncState, and the copied one is freed with deflateEnd() > > later. However, deflateEnd() refuses to operate with a copied z_stream > > and returns Z_STREAM_ERROR, leaking the allocated memory. > > > > Avoid copying the zlib state to fix the memory leak. > > > > Fixes: bd023f953e5e ("vnc: threaded VNC server") > > Signed-off-by: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp> > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > > Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> > > Message-Id: <20250603-zlib-v3-1-20b857bd8...@rsg.ci.i.u-tokyo.ac.jp> > > --- > > ui/vnc.h | 2 +- > > ui/vnc-enc-zlib.c | 30 +++++++++++++++--------------- > > ui/vnc.c | 13 ++++++++++--- > > 3 files changed, 26 insertions(+), 19 deletions(-) > > This looks like a qemu-stable material, is it not?
Yes, please cherry-pick this. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|