From e2c9e7c3fbd0d95f78f2e61b41c138daa1f00dc8 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 28 Aug 2012 14:19:34 +0400 Subject: [PATCH] applied patches from #2311 --- modules/highgui/src/cap_libv4l.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/highgui/src/cap_libv4l.cpp b/modules/highgui/src/cap_libv4l.cpp index c27224d9ee..6dcc567ca3 100644 --- a/modules/highgui/src/cap_libv4l.cpp +++ b/modules/highgui/src/cap_libv4l.cpp @@ -956,6 +956,7 @@ static int _capture_V4L (CvCaptureCAM_V4L *capture, char *deviceName) if (capture->memoryMap == MAP_FAILED) { fprintf( stderr, "HIGHGUI ERROR: V4L: Mapping Memmory from video source error: %s\n", strerror(errno)); icvCloseCAM_V4L(capture); + return -1; } /* Set up video_mmap structure pointing to this memory mapped area so each image may be @@ -1709,6 +1710,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){ } #endif + free(capture->deviceName); //v4l2_free_ranges(capture); //cvFree((void **)capture); }