fix possible use of free'd memory in table listing