delete cmd buffer in protocol destructor.