[libvirt] [0/2] Fix 2 possible crashes in JSON event dispatch