浏览代码

COMP: ctkFDHandler: Remove unused ivar, and initialize an other one

This issue were discovered while investigating a potential leak
associated with ctkFDHandler::setEnabled function.
Jean-Christophe Fillion-Robin 7 年之前
父节点
当前提交
7dc8ccafde
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2 0
      Libs/Core/ctkErrorLogFDMessageHandler.cpp
  2. 0 2
      Libs/Core/ctkErrorLogFDMessageHandler_p.h

+ 2 - 0
Libs/Core/ctkErrorLogFDMessageHandler.cpp

@@ -51,6 +51,8 @@ ctkFDHandler::ctkFDHandler(ctkErrorLogFDMessageHandler* messageHandler,
   this->LogLevel = logLevel;
   this->TerminalOutput = terminalOutput;
   this->SavedFDNumber = 0;
+  this->Pipe[0] = -1;
+  this->Pipe[1] = -1;
   this->Enabled = false;
 }
 

+ 0 - 2
Libs/Core/ctkErrorLogFDMessageHandler_p.h

@@ -75,8 +75,6 @@ private:
 
   int          Pipe[2]; // 0: Read, 1: Write
 
-  bool Initialized;
-
   mutable QMutex EnableMutex;
   bool Enabled;
 };