[libcamera-devel] [PATCH 2/6] test: log: log_process: Fix uninitialized variable on process exit failure
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Dec 7 17:28:17 CET 2023
Quoting Laurent Pinchart via libcamera-devel (2023-12-06 21:05:20)
> If the process fails to exit before the timeout, the
> LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by
> initializating to Process::NotExited.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> test/log/log_process.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
> index 17af7d74a1d5..f7635b70255c 100644
> --- a/test/log/log_process.cpp
> +++ b/test/log/log_process.cpp
> @@ -139,7 +139,7 @@ private:
> ProcessManager processManager_;
>
> Process proc_;
> - Process::ExitStatus exitStatus_;
> + Process::ExitStatus exitStatus_ = Process::NotExited;
> string logPath_;
> int exitCode_;
> int num_;
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list