diff options
author | Thomas Haller <thaller@redhat.com> | 2019-08-08 07:46:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-08-08 07:46:41 +0200 |
commit | b80b25050fe0c78b581b713c28280fc91c53fc09 (patch) | |
tree | 0c092c1b75553f9c8615c393dae994aac0c116cd | |
parent | 1b59d752beec43b82e53a4d14d9c6c5a09ceee86 (diff) | |
download | NetworkManager-b80b25050fe0c78b581b713c28280fc91c53fc09.tar.gz |
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
-rw-r--r-- | shared/n-dhcp4/src/n-dhcp4-c-probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c index 308cff8307..f1ac3db746 100644 --- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c +++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c @@ -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; |