Re: [PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset

2024-03-19 Thread Kamil Konieczny
Hi Janusz, On 2024-03-18 at 11:13:28 +0100, Janusz Krzysztofik wrote: > Users who store a pointer to struct igt_ktap_results, obtained from > igt_ktap_alloc(), in a central location and then call igt_ktap_free() when > no longer needed, now have to reset that pointer to NULL to avoid double > free

[PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset

2024-03-18 Thread Janusz Krzysztofik
Users who store a pointer to struct igt_ktap_results, obtained from igt_ktap_alloc(), in a central location and then call igt_ktap_free() when no longer needed, now have to reset that pointer to NULL to avoid double free on final cleanup. For their convenience, teach igt_ktap_free() to accept that