Moved a malloc call so that I was not access restricted memory.