On Tue, 24 Mar 2020 at 12:57, Yuval Shaia <yuval.shaia...@gmail.com> wrote: > So what i can do is to check list->list at every API since destroy > functions sets it to NULL.
No, that won't help. You can't check list->list for NULL without taking the lock (because in the append etc functions you really could be multithreaded), and you can't take the lock because it might have been destroyed. thanks -- PMM