]> git.sesse.net Git - kdenlive/commitdiff
fix v4l memleak
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 15 Nov 2010 11:02:38 +0000 (11:02 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 15 Nov 2010 11:02:38 +0000 (11:02 +0000)
svn path=/trunk/kdenlive/; revision=5099

src/v4l/v4lcapture.cpp

index 53ee5cf06ecdf272eeb303d775113ba3b8b6fb6b..a43f912eb3ddeabec5e7615b90c8193d7f9328e9 100644 (file)
@@ -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()));
 }