am 60097a9c: Merge "Structure device not freed in error case"

* commit '60097a9c5a7214cb73d0bc966adef767743f8798':
  Structure device not freed in error case