From 35ea2389befa7bbe6ea064e177197d32b7c1ceea Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 25 Jun 2015 18:16:55 +0200 Subject: [PATCH] team: fix potential crash if team binary doesn't exist warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') # 552| if (!teamd_kill (self, NULL, &error)) { # 553|-> _LOGW (LOGD_TEAM, "existing teamd config mismatch; failed to kill existing teamd: %s", error->message); # 554| *reason = NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED; Fixes: 24a764e831bff27647bb5025c1368582fade21cf (cherry picked from commit 4fa01c7dc92ffce449ef32620766712567151429) --- src/devices/team/nm-device-team.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index aedeebfdb2..23750f3579 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -428,7 +428,7 @@ teamd_kill (NMDeviceTeam *self, const char *teamd_binary, GError **error) gs_free char *tmp_str = NULL; if (!teamd_binary) { - teamd_binary = nm_utils_find_helper ("teamd", NULL, NULL); + teamd_binary = nm_utils_find_helper ("teamd", NULL, error); if (!teamd_binary) { _LOGW (LOGD_TEAM, "Activation: (team) failed to start teamd: teamd binary not found"); return FALSE;