diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-27 17:27:26 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-31 21:18:49 +0900 |
commit | 4154524d47d24bcee3ebfed939912a847ebeb1b3 (patch) | |
tree | d725546db7959400b0840c3991111675d946ea4b /src/udev | |
parent | 416e84192a0739de6ada3214fe84183f669aa8a9 (diff) | |
download | systemd-4154524d47d24bcee3ebfed939912a847ebeb1b3.tar.gz |
udev: fix potential memleak
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-builtin-net_id.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 0aede28f7d..9578fa00c3 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -101,7 +101,6 @@ static int get_virtfn_info(sd_device *dev, struct netnames *names, struct virtfn _cleanup_(sd_device_unrefp) sd_device *physfn_pcidev = NULL; const char *physfn_link_file, *syspath; _cleanup_free_ char *physfn_pci_syspath = NULL; - _cleanup_free_ char *virtfn_pci_syspath = NULL; struct dirent *dent; _cleanup_closedir_ DIR *dir = NULL; char suffix[ALTIFNAMSIZ]; @@ -132,7 +131,7 @@ static int get_virtfn_info(sd_device *dev, struct netnames *names, struct virtfn return -errno; FOREACH_DIRENT_ALL(dent, dir, break) { - _cleanup_free_ char *virtfn_link_file = NULL; + _cleanup_free_ char *virtfn_link_file = NULL, *virtfn_pci_syspath = NULL; if (!startswith(dent->d_name, "virtfn")) continue; |