Merge "Fix leakage of pointer location" into tm-qpr-dev