diff options
author | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2020-10-07 12:22:39 +0300 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-12 16:13:57 +0100 |
commit | 265daf6e595a390acaf1bc76207366ad774b7f6c (patch) | |
tree | 9286a4c91d41e1bcc82fe4a14dc192345f362e88 /src | |
parent | 503d61fc83d8c3875c1bd75a6ff11a77970ee764 (diff) |
vimc: fix close(-1)
~IPAVimc() checks if fd != 0, but it should check if fd != -1.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipa/vimc/vimc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp index ef257762..372a15f5 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_); } |