Fixed a double free() in Profiling.