The context would be confusing, and wouldn't help much, and this problem happens as I start running the program, and in the first complicated memory allocation (structures that contain other pointers and arrays), and passing by 2 levels of indirection like shown above.

I make sure I free as I finish in the same scope, and allocate everytime before using in the little isolated sequential program, the problems with freeing happens in the multithreaded/multiprocess one,

any ideas how I can trace that?

or any other ideas about the extra levels of indirection in passing parameters, and in structures of this type,

I appreciate your help a lot,

thanks,