mirror of https://gerrit.osmocom.org/gapk
tests: make both Valgrind and LeakSanitizer happy
The talloc_enable_null_tracking() actually allocates a new talloc context, which makes both Valgrind and LeakSanitizer angry. This context should be freed by the talloc_disable_null_tracking(). Change-Id: Ia660d2fdac720f685c0186720d0a476d7e9468be
This commit is contained in:
parent
b29b981092
commit
58c4bc68c8
|
@ -143,5 +143,8 @@ int main(int argc, char **argv)
|
|||
/* Make sure we have no memleaks */
|
||||
talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);
|
||||
|
||||
/* Make both Valgrind and LeakSanitizer happy */
|
||||
talloc_disable_null_tracking();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -145,5 +145,8 @@ int main(int argc, char **argv)
|
|||
/* Print talloc memory hierarchy */
|
||||
talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);
|
||||
|
||||
/* Make both Valgrind and LeakSanitizer happy */
|
||||
talloc_disable_null_tracking();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -345,5 +345,8 @@ int main(int argc, char **argv)
|
|||
/* Memory leak detection test */
|
||||
talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);
|
||||
|
||||
/* Make both Valgrind and LeakSanitizer happy */
|
||||
talloc_disable_null_tracking();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -369,5 +369,8 @@ int main(int argc, char **argv)
|
|||
printf("Processing queue deallocation test:\n");
|
||||
talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);
|
||||
|
||||
/* Make both Valgrind and LeakSanitizer happy */
|
||||
talloc_disable_null_tracking();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue