浏览代码

Merge pull request #9821 from richardkchapman/hpcc17342-exceptionleak

HPCC-17342 Leaks of IException objects

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 8 年之前
父节点
当前提交
b77d9bb452
共有 3 个文件被更改,包括 5 次插入1 次删除
  1. 3 1
      common/thorhelper/thorsoapcall.cpp
  2. 1 0
      ecl/eclagent/eclgraph.cpp
  3. 1 0
      roxie/ccd/ccdcontext.cpp

+ 3 - 1
common/thorhelper/thorsoapcall.cpp

@@ -290,7 +290,9 @@ private:
             catch (IException *e)
             {
                 StringBuffer s;
-                throw MakeStringException(ROXIE_ABORT_EVENT, "%s", e->errorMessage(s).str());
+                e->errorMessage(s);
+                e->Release();
+                throw MakeStringException(ROXIE_ABORT_EVENT, "%s", s.str());
             }
         }
     }

+ 1 - 0
ecl/eclagent/eclgraph.cpp

@@ -1597,6 +1597,7 @@ void EclAgent::executeThorGraph(const char * graphName)
             thorMaster.getUrlStr(s);
             s.append("; (").append(e->errorCode()).append(", ");
             e->errorMessage(s).append(")");
+            e->Release();
             throw MakeStringExceptionDirect(-1, s.str());
         }
         ThorReplyCodes replyCode;

+ 1 - 0
roxie/ccd/ccdcontext.cpp

@@ -2318,6 +2318,7 @@ protected:
                 thorMaster.getUrlStr(s);
                 s.append("; (").append(e->errorCode()).append(", ");
                 e->errorMessage(s).append(")");
+                e->Release();
                 throw MakeStringExceptionDirect(-1, s.str());
             }
             ThorReplyCodes replyCode;