Sfoglia il codice sorgente

HPCC-10552 Fix a couple of leaks

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 11 anni fa
parent
commit
2ef80d887d
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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;
     }