Hacker News new | ask | show | jobs
by tpankaj 1423 days ago
I noticed some other weirdness like functions taking a double pointer argument and then freeing the memory and replacing it with a newly allocated piece of memory. Seems rather dangerous to do that.

And zeroing out data by freeing the memory and callocing new memory. Why not just write zeros into the memory instead of reallocating it from scratch only to overwrite it with zeros anyway?