diff --git a/modules/highgui/src/cap_libv4l.cpp b/modules/highgui/src/cap_libv4l.cpp index 63a2ff96b0..ec048aff77 100644 --- a/modules/highgui/src/cap_libv4l.cpp +++ b/modules/highgui/src/cap_libv4l.cpp @@ -1714,6 +1714,7 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){ #endif free(capture->deviceName); + capture->deviceName = NULL; //v4l2_free_ranges(capture); //cvFree((void **)capture); }