From: Jean-Baptiste Mardelle Date: Mon, 15 Nov 2010 11:02:38 +0000 (+0000) Subject: fix v4l memleak X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ebd3f369eed887eefb9d2156552a015ee19ad92c;p=kdenlive fix v4l memleak svn path=/trunk/kdenlive/; revision=5099 --- diff --git a/src/v4l/v4lcapture.cpp b/src/v4l/v4lcapture.cpp index 53ee5cf0..a43f912e 100644 --- a/src/v4l/v4lcapture.cpp +++ b/src/v4l/v4lcapture.cpp @@ -183,6 +183,7 @@ QStringList V4lCaptureHandler::getDeviceName(QString input) uint height = 0; char *pixelformatdescription; QString deviceName(src_query(&v4lsrc, source, &width, &height, &pixelformatdescription)); + free(config); QStringList result; result << (deviceName.isEmpty() ? input : deviceName) << (width == 0 ? QString() : QString("%1x%2").arg(width).arg(height)) << QString(pixelformatdescription); return result; @@ -262,6 +263,7 @@ void V4lCaptureHandler::startPreview(int /*deviceId*/, int /*captureMode*/, bool if (src_open(&v4lsrc, source) != 0) return; m_update = true; + free(config); QTimer::singleShot(200, this, SLOT(slotUpdate())); }