diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-01 07:49:52 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-01 07:49:52 +0100 |
commit | c997f51c0f7e37beab594eb2394f47bd6f0d1b08 (patch) | |
tree | 6021d74ca6875d5b80ce43ad3076389ad9775f3b /src/libsystemd-network/sd-dhcp-server.c | |
parent | network: drop outdated TODO comment (diff) | |
download | systemd-c997f51c0f7e37beab594eb2394f47bd6f0d1b08.tar.xz systemd-c997f51c0f7e37beab594eb2394f47bd6f0d1b08.zip |
sd-dhcp-server: use free_and_replace() at one more place
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-server.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 9e462694c0..5774bc880e 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -1433,8 +1433,7 @@ int sd_dhcp_server_set_servers( return -ENOMEM; } - free(server->servers[what].addr); - server->servers[what].addr = c; + free_and_replace(server->servers[what].addr, c); server->servers[what].size = n_addresses; return 1; } |