3 ms·
> before you free, check for Null. You can free(NULL), no problem. It will not do anything.
by wott 9y ago
> before you free, check for Null.
You can free(NULL), no problem. It will not do anything.
- syockit 9y agoIt's usually a problem with pointers to structs that have pointer members. In a typical destruction sequence, you usually free the members before the struct itself.