Skip to content

Commit

Permalink
Avoid errors settings null values
Browse files Browse the repository at this point in the history
  • Loading branch information
albfan committed Sep 22, 2018
1 parent 8b76e3c commit 0c59cc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/wifi/wifid-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ void link_supplicant_started(struct link *l)
if (!l || l->public)
return;

link_set_friendly_name(l, l->m->friendly_name);
if (l->m->friendly_name)
link_set_friendly_name(l, l->m->friendly_name);
log_info("link %s managed", l->ifname);
}

Expand Down
6 changes: 4 additions & 2 deletions src/wifi/wifid.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ static void manager_add_udev_link(struct manager *m,
if (r < 0)
return;

link_set_friendly_name(l, m->friendly_name);
link_set_config_methods(l, m->config_methods);
if (m->friendly_name)
link_set_friendly_name(l, m->friendly_name);
if (m->config_methods)
link_set_config_methods(l, m->config_methods);

if(use_dev)
link_use_dev(l);
Expand Down

0 comments on commit 0c59cc7

Please sign in to comment.