core: Fix leak in TLS. #6231
auto merge of #6493 : brson/rust/tls, r=thestinger