mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 05:10:17 +01:00
core: fix potential crash in nm-dhcp-client
Error found by coverity. https://bugzilla.gnome.org/show_bug.cgi?id=728320 Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
9305c5bbf7
commit
f19e79cd7a
1 changed files with 1 additions and 1 deletions
|
|
@ -559,13 +559,13 @@ get_duid (NMDHCPClient *client)
|
|||
if (leasefile) {
|
||||
nm_log_dbg (LOGD_DHCP, "Looking for DHCPv6 DUID in '%s'.", leasefile);
|
||||
duid = nm_dhcp_dhclient_read_duid (leasefile, &error);
|
||||
g_free (leasefile);
|
||||
|
||||
if (error) {
|
||||
nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': (%d) %s",
|
||||
leasefile, error->code, error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
g_free (leasefile);
|
||||
}
|
||||
|
||||
if (!duid && priv->def_leasefile) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue