core/team: fix leak and uninitialized GError in NMDeviceTeam's constructed()

Found with `git grep 'GError.*[^,)];'| grep ' *= *NULL;' -v`

Fixes: d689380cfc ('team: support operation without D-Bus')
This commit is contained in:
Thomas Haller 2022-03-09 23:00:21 +01:00
parent a628a35e80
commit 43748d2980
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -957,7 +957,7 @@ constructed(GObject *object)
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE(device);
gs_free char *tmp_str = NULL;
gs_unref_object GFile *file = NULL;
GError *error;
gs_free_error GError *error = NULL;
G_OBJECT_CLASS(nm_device_team_parent_class)->constructed(object);