Commit cbda8ebc authored by Ali Ijaz Sheikh's avatar Ali Ijaz Sheikh Committed by Commit Bot

tracing: fix fencepost error in destructor

Change-Id: Icf7ff0661cb5d5866af0ffa7bd4aa3d78da84754
Reviewed-on: https://chromium-review.googlesource.com/1228419Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Cr-Commit-Position: refs/heads/master@{#56005}
parent 11245b26
......@@ -49,7 +49,7 @@ TracingController::~TracingController() {
{
// Free memory for category group names allocated via strdup.
base::LockGuard<base::Mutex> lock(mutex_.get());
for (size_t i = g_category_index - 1; i > g_num_builtin_categories; --i) {
for (size_t i = g_category_index - 1; i >= g_num_builtin_categories; --i) {
const char* group = g_category_groups[i];
g_category_groups[i] = nullptr;
free(const_cast<char*>(group));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment