summaryrefslogtreecommitdiff
path: root/src/hostname
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-10 00:34:46 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-05-10 00:57:34 +0900
commit130d3d22e97114fc0b9c685aa8db437454a10635 (patch)
treecbf9c6aff9349f07b8cc23371191f3ceb5f1c699 /src/hostname
parent947f9f01a187702dd01c2a8cb348a2f4164acd94 (diff)
downloadsystemd-130d3d22e97114fc0b9c685aa8db437454a10635.tar.gz
systemd-130d3d22e97114fc0b9c685aa8db437454a10635.tar.bz2
systemd-130d3d22e97114fc0b9c685aa8db437454a10635.zip
tree-wide: use strv_free_and_replace() macro
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c3
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)) {