WIP: valgrind runtime analysis and fixes (#6521)

* Fix several valgrind identified mem leaks

* Added callgrind target.

* px4_posix_tasks use nullptr
This commit is contained in:
James Goppert
2017-02-17 12:36:52 -05:00
committed by GitHub
parent a0f00f84f3
commit 7659402fdb
6 changed files with 67 additions and 51 deletions
@@ -291,6 +291,7 @@ int px4_task_delete(px4_task_t id)
// If current thread then exit, otherwise cancel
if (pthread_self() == pid) {
pthread_join(pid, nullptr);
taskmap[id].isused = false;
pthread_mutex_unlock(&task_mutex);
pthread_exit(nullptr);