<div dir="ltr">Ooops! Thanks for catching this! I'll resend it.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 11:04 PM, Andrey Semashev <span dir="ltr"><<a href="mailto:andrey.semashev@gmail.com" target="_blank">andrey.semashev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 07/21/17 09:29, <a href="mailto:aruna@multicorewareinc.com" target="_blank">aruna@multicorewareinc.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User Aruna Matheswaran <<a href="mailto:aruna@multicorewareinc.com" target="_blank">aruna@multicorewareinc.com</a>><br>
# Date 1500457328 -19800<br>
#      Wed Jul 19 15:12:08 2017 +0530<br>
# Branch stable<br>
# Node ID fd354d5ec1328a000c24e1551804a1<wbr>ce569ec3b0<br>
# Parent  adbcc90bdef36b50a091deb5b0d0ad<wbr>77debfbee7<br>
threadpool: fix memory leak<br>
<br>
diff -r adbcc90bdef3 -r fd354d5ec132 source/common/threadpool.cpp<br>
--- a/source/common/threadpool.<wbr>cpp      Thu Jul 13 16:50:18 2017 +0530<br>
+++ b/source/common/threadpool.<wbr>cpp      Wed Jul 19 15:12:08 2017 +0530<br>
@@ -454,6 +454,7 @@<br>
                      if ((nodeMaskPerPool[node] >> j) & 1)<br>
                          len += sprintf(nodesstr + len, ",%d", j);<br>
                  x265_log(p, X265_LOG_INFO, "Thread pool %d using %d threads on numa nodes %s\n", i, numThreads, nodesstr + 1);<br>
+                free(nodesstr);<br>
</blockquote>
<br></span>
This applies free() to a pointer obtained with new[]. It should be delete[] or better yet - replace the original new with a buffer on the stack.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              }<br>
              else<br>
                  x265_log(p, X265_LOG_INFO, "Thread pool created using %d threads\n", numThreads);<br>
<br>
</blockquote></span>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/l<wbr>istinfo/x265-devel</a><br>
</blockquote></div><br></div>