summaryrefslogtreecommitdiffstats
path: root/libtiutils
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2011-09-23 09:37:27 -0700
committerIliyan Malchev <malchev@google.com>2011-09-23 09:37:27 -0700
commit18d4cb78c873c0ac1ab145f9b70d8f3d0e715185 (patch)
tree400bc44f283735e5f54514e39f8ffcb7cc4a4fd1 /libtiutils
parentd9c52eb4fa1e27ffd33f22d9987f60a8a714b7bf (diff)
downloadhardware_ti_omap4xxx-18d4cb78c873c0ac1ab145f9b70d8f3d0e715185.zip
hardware_ti_omap4xxx-18d4cb78c873c0ac1ab145f9b70d8f3d0e715185.tar.gz
hardware_ti_omap4xxx-18d4cb78c873c0ac1ab145f9b70d8f3d0e715185.tar.bz2
libtiutils: fix an fd leak I introduced
Change-Id: Ib956613f334c31b20a402bc618cd72a04603d828 Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'libtiutils')
-rwxr-xr-xlibtiutils/MessageQueue.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtiutils/MessageQueue.cpp b/libtiutils/MessageQueue.cpp
index 35b4873..28bb0e3 100755
--- a/libtiutils/MessageQueue.cpp
+++ b/libtiutils/MessageQueue.cpp
@@ -74,12 +74,12 @@ MessageQueue::~MessageQueue()
{
LOG_FUNCTION_NAME;
- if(this->fd_read < 0)
+ if(this->fd_read >= 0)
{
close(this->fd_read);
}
- if(this->fd_write < 0)
+ if(this->fd_write >= 0)
{
close(this->fd_write);
}