diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-10 00:34:46 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-10 00:57:34 +0900 |
commit | 130d3d22e97114fc0b9c685aa8db437454a10635 (patch) | |
tree | cbf9c6aff9349f07b8cc23371191f3ceb5f1c699 /src/hostname | |
parent | 947f9f01a187702dd01c2a8cb348a2f4164acd94 (diff) | |
download | systemd-130d3d22e97114fc0b9c685aa8db437454a10635.tar.gz |
tree-wide: use strv_free_and_replace() macro
Diffstat (limited to 'src/hostname')
-rw-r--r-- | src/hostname/hostnamed.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index d9ad2fb2fe..f3deece5b0 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -338,8 +338,7 @@ static int context_write_data_machine_info(Context *c) { if (!u) return -ENOMEM; - strv_free(l); - l = u; + strv_free_and_replace(l, u); } if (strv_isempty(l)) { |