C free(): invalid pointer
You’re attempting to free something that isn’t a pointer to a “freeable” memory address. Just because something is an address doesn’t mean that you need to or should free it. There are two main types of memory you seem to be confusing – stack memory and heap memory. Stack memory lives in the live span of the function. … Read more