diff --git a/modules/videoio/src/cap_gstreamer.cpp b/modules/videoio/src/cap_gstreamer.cpp index 41754eaa0..e6edccdf5 100644 --- a/modules/videoio/src/cap_gstreamer.cpp +++ b/modules/videoio/src/cap_gstreamer.cpp @@ -608,7 +608,7 @@ bool CvCapture_GStreamer::open( int type, const char* filename ) struct stat buf; if (pathSize == 0 || stat(uri, &buf) != 0) { - delete uri; + delete[] uri; uri = NULL; } #else