Merge "Fix a memory leak in UidState." into tm-qpr-dev