From a5720e571939ff452967cf9cdb1b7d8665708739 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 20 Nov 2018 10:44:39 +0100 Subject: Fix memory leaks --- vncviewer/DesktopWindow.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vncviewer/DesktopWindow.cxx') diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index d070b648..1843485a 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -103,12 +103,12 @@ DesktopWindow::DesktopWindow(int w, int h, const char *name, int geom_x = 0, geom_y = 0; if (strcmp(geometry, "") != 0) { int matched; - matched = sscanf(geometry.getValueStr(), "+%d+%d", &geom_x, &geom_y); + matched = sscanf((const char*)geometry, "+%d+%d", &geom_x, &geom_y); if (matched == 2) { force_position(1); } else { int geom_w, geom_h; - matched = sscanf(geometry.getValueStr(), "%dx%d+%d+%d", &geom_w, &geom_h, &geom_x, &geom_y); + matched = sscanf((const char*)geometry, "%dx%d+%d+%d", &geom_w, &geom_h, &geom_x, &geom_y); switch (matched) { case 4: force_position(1); -- cgit v1.2.3