test: buffer_import: Initialize video_ to nullptr
When the vivid module used to test buffer importing is not loaded, the
test correctly bails out, but during the clean up procedure tries to
access the video_ field, which, if not correctly initialized to
nullptr contains random values and accessing it causes a segfault.
Fix this by initializing video_ field to nullptr to make sure it is
properly handled in cleanup().
Fixes: e1a5873701
("test: camera: Add buffer import and mapping test")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
a422b30939
commit
0f2e8cac8d
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ static constexpr unsigned int CAMERA_BUFFER_COUNT = 4;
|
|||
class FrameSink
|
||||
{
|
||||
public:
|
||||
FrameSink()
|
||||
: video_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
int init()
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue