소스 검색

HPCC-10552 Fix a couple of leaks

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 11 년 전
부모
커밋
2ef80d887d
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      system/jlib/jutil.cpp
  2. 1 0
      system/mp/mpbase.cpp

+ 1 - 1
system/jlib/jutil.cpp

@@ -1633,7 +1633,7 @@ bool callExternalProgram(const char *progname, const StringBuffer &input, String
         char buf[4096];
         for(;;)
         {
-            size32_t r=pipe2.Read(buf, sizeof(buf));
+            int r=pipe2.Read(buf, sizeof(buf));
             if(r>0)
             {
                 output.append(r, buf);

+ 1 - 0
system/mp/mpbase.cpp

@@ -346,6 +346,7 @@ public:
             newgrp->nodes[i] = LINK(nodes[i]);
         for (rank_t k=0;k<j; k++)
             newgrp->nodes[i++] = tmp[k];
+        free(tmp);
         return newgrp;
     }