libfreerdp-core: fix leak and use after free in tsg ListDictionary usage