mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-08 05:57:26 +03:00
udev: fix potential memleak
This commit is contained in:
parent
416e84192a
commit
4154524d47
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user