mirror of
https://github.com/systemd/systemd.git
synced 2024-11-15 07:24:00 +03:00
udev: link-config - only set *name on success
This commit is contained in:
parent
ad6e5b348f
commit
d95b83b87d
@ -424,8 +424,6 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
|
||||
} else
|
||||
new_name = NULL;
|
||||
|
||||
*name = new_name;
|
||||
|
||||
switch (config->mac_policy) {
|
||||
case MACPOLICY_PERSISTENT:
|
||||
if (mac_is_random(device)) {
|
||||
@ -459,6 +457,8 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
|
||||
return r;
|
||||
}
|
||||
|
||||
*name = new_name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user