libnm: fix checking argument in nm_team_link_watcher_new_arp_ping()

Found by coverity.

Fixes: 6c93e32212
This commit is contained in:
Thomas Haller
2017-12-12 10:31:01 +01:00
parent a7087b1f05
commit fb2da4b26c

View File

@@ -249,7 +249,7 @@ nm_team_link_watcher_new_arp_ping (gint init_wait,
return NULL;
}
if (strpbrk (target_host, " \\/\t=\"\'")) {
if (strpbrk (source_host, " \\/\t=\"\'")) {
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED,
_("source-host '%s' contains invalid characters"), source_host);
return NULL;