am 2be45697: Merge "Fix two memory leaks Bug #6408362" into jb-dev

* commit '2be45697f93291e1740c3b7e4ba0af5d4ae81ed6':
  Fix two memory leaks Bug #6408362