fix leak of protobuf metadata allocation
clear the status and metrics if they exist