core/team: drop bad use of g_return_val_if_reached()

It's perfectly legal for teamdctl_alloc() to return NULL (on
out-of-memory conditions I guess) and we already handle it just fine.
No need to trip an assertion.
This commit is contained in:
Lubomir Rintel 2022-11-21 07:53:23 +01:00
parent 7442a8296c
commit b792a74785

View file

@ -77,7 +77,7 @@ _tdc_connect_new(NMDeviceTeam *self, const char *iface, GError **error)
tdc = teamdctl_alloc();
if (!tdc) {
nm_utils_error_set(error, NM_UTILS_ERROR_UNKNOWN, "failure to allocate teamdctl structure");
g_return_val_if_reached(NULL);
return NULL;
}
if (priv->teamd_dbus_watch)