Should I free all my mallocated memory when I am exiting program in the due of error?
something = (char**) malloc (x * sizeof(char*)); for (i = 0; i < x;
I had completely opposite scenario: segfaulting destructors of static objects from third-party library. Just because of explicitly freeing memory pools before exit. I believe, it is better to be reasonable and to concentrate on program structure.