[libcamera-devel] [PATCH 4/4] vimc: fix close(-1)
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Oct 7 11:34:57 CEST 2020
Hi Tomi,
On 07/10/2020 10:22, Tomi Valkeinen wrote:
> ~IPAVimc() checks if fd != 0, but it should check if fd != -1.
>
Aha, - that explains a valgrind error I saw but hadn't yet investigated ;-)
Thanks
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>
> ---
> src/ipa/vimc/vimc.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
> index ef25776..372a15f 100644
> --- a/src/ipa/vimc/vimc.cpp
> +++ b/src/ipa/vimc/vimc.cpp
> @@ -61,7 +61,7 @@ IPAVimc::IPAVimc()
>
> IPAVimc::~IPAVimc()
> {
> - if (fd_)
> + if (fd_ != -1)
> ::close(fd_);
> }
>
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list