network: DHCP server remove duplicate free

This commit is contained in:
Susant Sahani 2019-10-31 21:55:48 +01:00 committed by Yu Watanabe
parent c0619079cc
commit 0cc9e972ff

View file

@ -151,10 +151,8 @@ _public_ int sd_dhcp_raw_option_new(uint8_t type, char *data, size_t length, sd_
.type = type,
};
if (!p->data) {
free(p);
if (!p->data)
return -ENOMEM;
}
*ret = TAKE_PTR(p);
return 0;