summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-25 18:16:55 +0200
committerThomas Haller <thaller@redhat.com>2015-06-25 18:49:18 +0200
commit4fa01c7dc92ffce449ef32620766712567151429 (patch)
tree4b0fe90387ea8c776583325c3e49545a6940c53a
parentcd5b26054597b1c84bd2c04065c72740e9bdd703 (diff)
downloadNetworkManager-4fa01c7dc92ffce449ef32620766712567151429.tar.gz
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
-rw-r--r--src/devices/team/nm-device-team.c2
1 files changed, 1 insertions, 1 deletions
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;