Merge pull request #13895 from jsynacek/master
sd-dhcp: fix resource leak
This commit is contained in:
commit
3ec56e53a2
|
@ -151,8 +151,10 @@ _public_ int sd_dhcp_raw_option_new(uint8_t type, char *data, size_t length, sd_
|
|||
.type = type,
|
||||
};
|
||||
|
||||
if (!p->data)
|
||||
if (!p->data) {
|
||||
free(p);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
*ret = p;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue