[libvirt] [PATCHv2] snapshot: fix memory leak on error