mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 03:10:16 +01:00
initrd: fix use-after-free for variable "s_gateway" in nmi_dt_reader_parse()
(cherry picked from commit 321a323df4)
This commit is contained in:
parent
f17bb012fe
commit
f970039122
1 changed files with 2 additions and 2 deletions
|
|
@ -329,8 +329,6 @@ nmi_dt_reader_parse (const char *sysfs_dir)
|
|||
|
||||
if (netmask)
|
||||
nm_ip_address_unref (netmask);
|
||||
if (gateway)
|
||||
nm_ip_address_unref (gateway);
|
||||
}
|
||||
|
||||
if (!ipaddr) {
|
||||
|
|
@ -377,6 +375,8 @@ nmi_dt_reader_parse (const char *sysfs_dir)
|
|||
|
||||
if (ipaddr)
|
||||
nm_ip_address_unref (ipaddr);
|
||||
if (gateway)
|
||||
nm_ip_address_unref (gateway);
|
||||
|
||||
if (duplex || speed || hwaddr || local_hwaddr) {
|
||||
s_wired = nm_setting_wired_new ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue