*** glibc detected *** free(): invalid pointer: