mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 14:40:08 +01:00
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: 24a764e831
(cherry picked from commit 4fa01c7dc9)
This commit is contained in:
parent
9d0c9733a5
commit
35ea2389be
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue