Moved the freein of the memory in the s pointer to the function that changes the memory size taken by the string