Merge changes I0bc6ba30,Ic173b296

* changes:
  guest_composer: fix a potential use of NULL
  device: delete pointless null checks; fix memory leak