mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 20:30:13 +01:00
n-dhcp4: allocate memory of right size in n_dhcp4_client_probe_option_new()
Non-critical, as the allocated memory was larger than needed. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/224
This commit is contained in:
parent
1b59d752be
commit
b80b25050f
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ static int n_dhcp4_client_probe_option_new(NDhcp4ClientProbeOption **optionp,
|
|||
uint8_t n_data) {
|
||||
NDhcp4ClientProbeOption *op;
|
||||
|
||||
op = malloc(sizeof(op) + n_data);
|
||||
op = malloc(sizeof(*op) + n_data);
|
||||
if (!op)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue