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