[x265] [PATCH] threadpool: fix memory leak

praveen at multicorewareinc.com praveen at multicorewareinc.com
Mon May 23 13:51:52 CEST 2016


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1464004220 -19800
#      Mon May 23 17:20:20 2016 +0530
# Node ID 75d8cadc3f1acbffbbbc651d26c597a96007167b
# Parent  5af929bc0ed0827ae0be018c1c8edc10d8650406
threadpool: fix memory leak

diff -r 5af929bc0ed0 -r 75d8cadc3f1a source/common/threadpool.cpp
--- a/source/common/threadpool.cpp	Mon May 23 15:47:38 2016 +0530
+++ b/source/common/threadpool.cpp	Mon May 23 17:20:20 2016 +0530
@@ -3,6 +3,7 @@
  *
  * Authors: Steve Borho <steve at borho.org>
  *          Min Chen <chenm003 at 163.com>
+ *          Praveen Kumar Tiwari <praveen at multicorewareinc.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -420,6 +421,7 @@
                     if ((nodeMaskPerPool[node] >> j) & 1)
                         len += sprintf(nodesstr + len, ",%d", j);
                 x265_log(p, X265_LOG_INFO, "Thread pool %d using %d threads on numa nodes %s\n", i, numThreads, nodesstr + 1);
+                delete[] nodesstr;
             }
             else
                 x265_log(p, X265_LOG_INFO, "Thread pool created using %d threads\n", numThreads);


More information about the x265-devel mailing list