Corrected memory allocation bug in set_rtt