fixed checker crash

- fixed strcpy instead of strdup
- free memory