From 3af1b6ecdce4395da7bf31a5df30649e2874046a Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 13 Jun 2019 19:02:54 +0300 Subject: [PATCH] valgrind: fix issues --- modules/videoio/src/cap_images.cpp | 1 + platforms/scripts/valgrind.supp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/modules/videoio/src/cap_images.cpp b/modules/videoio/src/cap_images.cpp index 8e23793e8c..92de9247a8 100644 --- a/modules/videoio/src/cap_images.cpp +++ b/modules/videoio/src/cap_images.cpp @@ -437,6 +437,7 @@ Ptr create_Images_writer(const std::string &filename, int, double, { if( writer->open( filename.c_str() )) return makePtr(writer); + delete writer; } catch (...) { diff --git a/platforms/scripts/valgrind.supp b/platforms/scripts/valgrind.supp index 7664c632c1..321ec9e60b 100644 --- a/platforms/scripts/valgrind.supp +++ b/platforms/scripts/valgrind.supp @@ -226,3 +226,12 @@ fun:_ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii fun:cvWriteFrame_FFMPEG } + +{ + OpenCV-test-gapi-thread-tls + Memcheck:Leak + match-leak-kinds: possible + fun:calloc + fun:allocate_dtv + fun:_dl_allocate_tls +}