Do not free return value of tgetstr

OTS review by @tryneus