Merge pull request #13895 from jsynacek/master

sd-dhcp: fix resource leak
This commit is contained in:
Anita Zhang
2019-10-31 11:39:08 -07:00
committed by GitHub
+3 -1
View File
@@ -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;