Commit b09c2cd3 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Fix leaking ClassItem

...in InsertVirtualMethodsOp. Leak occurred while running

    test_quickfix_InsertVirtualMethods(final_function_removed)

in valgrind memcheck.

Change-Id: I1119b68feb25ecd6e210201c7e0f1e651e2542f9
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent f4adc00b
......@@ -608,7 +608,10 @@ public:
++m_functionCount;
}
}
if (!itemBase->functions.isEmpty())
if (itemBase->functions.isEmpty())
delete itemBase;
else
m_factory->classFunctionModel->addClass(itemBase);
}
if (m_factory->classFunctionModel->classes.isEmpty() || m_functionCount == 0)
......
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