Properly free m_mtdev when mtdev_open() returns an error

Pick-to: 5.15
Change-Id: I57813da1eafe9fbc9d60b865e867558791e34528
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Steffen Kieß 2020-08-24 15:09:17 +02:00
parent afd34d74b8
commit 2cb8568ab2

View File

@ -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