am 86b2ecdd: Merge "fix mem leak on error handling"

* commit '86b2ecdd311fca2e1e4a3504bf96bb23c5630492':
  fix mem leak on error handling