set to NULL after freeing

see https://github.com/stephenmathieson/clib-package/commit/56e891e8d281fda59d4aa9faff06780baaa7e711#diff-218e8547bbe36a418d110639ff432983R282

/cc @stephenmathieson