My apologies for the confusion, I am just using malloc or calloc to allocate memory the struct pointer.
Essentially I am asking if the function goes to the logger exception, will it skip the freeing of the structure allocated memory by malloc/calloc? If so how so I resolve this issue?