sd-dhcp-client: remove unnecessary cleanup function

https://github.com/systemd/systemd/pull/13663#discussion_r335327099
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-10-24 12:00:07 +02:00
parent de157fe2a7
commit 9b08c804ef
+2 -5
View File
@@ -548,16 +548,13 @@ static sd_dhcp_option* dhcp_option_free(sd_dhcp_option *i) {
}
int sd_dhcp_option_new(uint8_t option, void *data, size_t length, sd_dhcp_option **ret) {
_cleanup_(sd_dhcp_option_unrefp) sd_dhcp_option *p = NULL;
_cleanup_free_ void *q = NULL;
assert(ret);
q = memdup(data, length);
_cleanup_free_ void *q = memdup(data, length);
if (!q)
return -ENOMEM;
p = new(sd_dhcp_option, 1);
sd_dhcp_option *p = new(sd_dhcp_option, 1);
if (!p)
return -ENOMEM;