error checking fr cur_xds_payload_length
handle memory leakage
leakage of file handler
resource leak in configuration