am 80470cdf: Merge "Solve three memory leaks related to PatchCache"

* commit '80470cdf6c6995f4afe8d5e2c4b6e898625173fb':
  Solve three memory leaks related to PatchCache