diff options
author | Andreas Henriksson <andreas@fatal.se> | 2014-06-13 18:48:20 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-13 18:57:33 +0200 |
commit | 8186d9dda0d3f8a853afe6fdbd605f42151fe165 (patch) | |
tree | 8d40d1d22fa0150df90d89736989b34dd5600fee /src/libsystemd-network | |
parent | 97578344f3bd03c8ea651d8888622e82c599eadf (diff) |
sd-dhcp-client: fix invalid free() in client_send_request()
static int client_send_request(...) in
./src/libsystemd-network/sd-dhcp-client.c tries to initialize
"request" by calling client_message_init(...), which has atleast
5 error cases where it can return without that happening.
This leads to the function finishing without "request" being initialized.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 8f549060bf..2a46624f2e 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -413,7 +413,7 @@ static int client_send_discover(sd_dhcp_client *client) { } static int client_send_request(sd_dhcp_client *client) { - _cleanup_free_ DHCPPacket *request; + _cleanup_free_ DHCPPacket *request = NULL; size_t optoffset, optlen; int r; |