summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2020-10-07 12:22:39 +0300
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-12 16:13:57 +0100
commit265daf6e595a390acaf1bc76207366ad774b7f6c (patch)
tree9286a4c91d41e1bcc82fe4a14dc192345f362e88 /src
parent503d61fc83d8c3875c1bd75a6ff11a77970ee764 (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.cpp2
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_);
}