tree-wide: use TAKE_PTR() and TAKE_FD() macros

This commit is contained in:
Yu Watanabe
2018-04-05 14:26:26 +09:00
parent 3d282fff06
commit 1cc6c93a95
136 changed files with 383 additions and 736 deletions
+3 -7
View File
@@ -626,15 +626,11 @@ int config_parse_wireguard_endpoint(const char *unit,
if (!port)
return log_oom();
endpoint->peer = peer;
endpoint->host = host;
endpoint->port = port;
endpoint->peer = TAKE_PTR(peer);
endpoint->host = TAKE_PTR(host);
endpoint->port = TAKE_PTR(port);
endpoint->netdev = netdev_ref(data);
LIST_PREPEND(endpoints, w->unresolved_endpoints, endpoint);
peer = NULL;
host = NULL;
port = NULL;
endpoint = NULL;
return 0;