network: DHCP server remove duplicate free

This commit is contained in:
Susant Sahani
2019-11-01 11:40:32 +09:00
committed by Yu Watanabe
parent c0619079cc
commit 0cc9e972ff
+1 -3
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;