From 3ca59d3ccfa73f5ab29116cfab5889f8b172b857 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 23 Dec 2021 16:06:14 +0100 Subject: [PATCH] Avoid leaking overlay memory Fl_RGB_Image doesn't take ownership of the pixel data, so we have to explicitly free this as well once we are done. --- vncviewer/DesktopWindow.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 2cfbbbda..bf04aad2 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -759,6 +759,7 @@ void DesktopWindow::setOverlay(const char* text, ...) gettimeofday(&overlayStart, NULL); delete image; + delete [] buffer; Fl::add_timeout(1.0/60, updateOverlay, this); } -- 2.39.5