cloud-setup: clear error variable in nmcs_device_reapply()

This is rather bad, because if we reach the "goto again" case,
the error variable is not cleared. Subsequently passing the
error location to nm_device_reapply_finish() will trigger a glib
warning.

Fixes: 29b0420be7 ('nm-cloud-setup: set preserve-external-ip flag during reapply')
This commit is contained in:
Thomas Haller
2023-06-05 13:04:53 +02:00
parent dab114f038
commit c70a5470be

View File

@@ -581,6 +581,8 @@ nmcs_device_reapply(NMDevice *device,
NMDeviceReapplyFlags reapply_flags = NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP; NMDeviceReapplyFlags reapply_flags = NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP;
again: again:
g_clear_error(&data.error);
nm_device_reapply_async(device, nm_device_reapply_async(device,
connection, connection,
version_id, version_id,