fix bug in compatc_protocol.go, prevent memory leak