diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2019-07-18 04:07:30 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2019-08-01 10:53:04 +0100 |
commit | 1a6b80e4a0fa7b2be8fa6c4a25a33f92ce66f563 (patch) | |
tree | 220a1939ed6bbeb6633be25d780edc1c55051bde /src/cam/options.cpp | |
parent | 119428fa1cbfd089961cf7b743dae55e06f06bf7 (diff) |
test: camera: buffer_import: clear video pointer
The FrameSink::cleanup() call checks if video_ is set before cleaning up
and then deleting the object.
If the cleanup() call is called twice for any reason, this will
encounter a use-after-free as the video_ pointer is not cleared after
deletion.
Whilst cleanup() is not currently called twice consecutively, to prevent
errors in the future, make it explicit that the object has been deleted
by clearing the stale pointer.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/options.cpp')
0 files changed, 0 insertions, 0 deletions