mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 07:08:02 +02:00
shared: fix invalid assertion in nm_utils_team_link_watcher_from_string()
Fixes: a473ab431a ('cli: refactor team-link-watcher to/from strings')
This commit is contained in:
parent
61b1d1e963
commit
9e544d527a
1 changed files with 4 additions and 3 deletions
|
|
@ -348,12 +348,12 @@ nm_utils_team_link_watcher_from_string (const char *str,
|
|||
}
|
||||
|
||||
#if NM_MORE_ASSERTS > 5
|
||||
{
|
||||
if (watcher) {
|
||||
gs_free char *str2 = NULL;
|
||||
nm_auto_unref_team_link_watcher NMTeamLinkWatcher *watcher2 = NULL;
|
||||
static _nm_thread_local int recursive;
|
||||
|
||||
nm_assert (watcher);
|
||||
nm_assert (!error || !*error);
|
||||
if (recursive == 0) {
|
||||
recursive = 1;
|
||||
str2 = nm_utils_team_link_watcher_to_string (watcher);
|
||||
|
|
@ -365,7 +365,8 @@ nm_utils_team_link_watcher_from_string (const char *str,
|
|||
nm_assert (recursive == 1);
|
||||
recursive = 0;
|
||||
}
|
||||
}
|
||||
} else
|
||||
nm_assert (!error || *error);
|
||||
#endif
|
||||
|
||||
return watcher;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue