From b792a74785eba922ac8d96ab43de575b76e8988c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 21 Nov 2022 07:53:23 +0100 Subject: [PATCH] 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. --- src/core/devices/team/nm-device-team.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 415a00b597..19c6b5598d 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -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)