glibc memory error with client