From 2cb8568ab2a173fdc4d00d603df236078886802e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Kie=C3=9F?= Date: Mon, 24 Aug 2020 15:09:17 +0200 Subject: Properly free m_mtdev when mtdev_open() returns an error Pick-to: 5.15 Change-Id: I57813da1eafe9fbc9d60b865e867558791e34528 Reviewed-by: Giuseppe D'Angelo --- src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/platformsupport') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 313d201515..1983a46afb 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -254,6 +254,7 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const if (mtdeverr) { qWarning("evdevtouch: mtdev_open failed: %d", mtdeverr); QT_CLOSE(m_fd); + free(m_mtdev); return; } #endif -- cgit v1.2.1