Projects
openEuler:24.03:SP1:Everything
pciutils
_service:tar_scm:0003-Fix-memory-leak-when-fill...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0003-Fix-memory-leak-when-fill-flags-has-PCI_FILL_PARENT.patch of Package pciutils
From 869a9f66b6aa723d9f90b4b3e27cd96bee5e0180 Mon Sep 17 00:00:00 2001 From: nsf.cd <zhaolei4@nsfocus.com> Date: Fri, 9 Aug 2024 14:06:44 +0800 Subject: [PATCH] Fix memory leak when fill flags has PCI_FILL_PARENT. --- lib/sysfs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/sysfs.c b/lib/sysfs.c index ffa4f9d..135a967 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -407,12 +407,18 @@ sysfs_fill_info(struct pci_dev *d, unsigned int flags) path_canon = realpath(path_rel, NULL); if (!path_canon || strcmp(path_canon, path_abs) != 0) parent = NULL; + + if (path_canon) + free(path_canon); } if (parent) d->parent = parent; else clear_fill(d, PCI_FILL_PARENT); + + if (path_abs) + free(path_abs); } } -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2