libcamera/test/gstreamer
Vedant Paranjape ca9ea1f9ce test: gstreamer_single_stream_test: Fix memory leak
The test hold a valid reference to convert0_ and sink0_ but
not released. This results in a memory leak and can be checked
via valgrind. Drop the references with test cleanup() virtual
function.

Valgrind log (glib and gst suppression files were used):
==345380== LEAK SUMMARY:
==345380==    definitely lost: 1,688 bytes in 2 blocks
==345380==    indirectly lost: 7,069 bytes in 42 blocks

The patch fixes the leaks reported by valgrind above to:
==348870== LEAK SUMMARY:
==348870==    definitely lost: 0 bytes in 0 blocks
==348870==    indirectly lost: 0 bytes in 0 blocks

Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
2021-09-23 16:03:01 +09:00
..
gstreamer_single_stream_test.cpp test: gstreamer_single_stream_test: Fix memory leak 2021-09-23 16:03:01 +09:00
gstreamer_test.cpp test: gstreamer: Fix the destructor of GstreamerTest base class 2021-09-09 15:47:38 +01:00
gstreamer_test.h test: gstreamer: Factor out code into a base class 2021-09-08 17:40:53 +09:00
meson.build test: gstreamer: Factor out code into a base class 2021-09-08 17:40:53 +09:00