discover: cleanup allocated data