Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
ndctl
ndctl-lib-libndctl-fix-memory-leakage-problem-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ndctl-lib-libndctl-fix-memory-leakage-problem-in-add_bus.patch of Package ndctl
From 77cbb4ad9f31bcb204b6a7ff1bd36f2e781dd861 Mon Sep 17 00:00:00 2001 From: Zhiqiang Liu <liuzhiqiang26@huawei.com> Date: Fri, 6 Nov 2020 17:25:03 +0800 Subject: [PATCH] lib/libndctl: fix memory leakage problem in add_bus References: bsc#1170384 Patch-mainline: v71 Git-commit: 77cbb4ad9f31bcb204b6a7ff1bd36f2e781dd861 In add_bus(), bus->bus_path is set by calling parent_dev_path(), which will finally adopt realpath(, NULL) to allocate new path. However, bus->bus_path will not be freed in err_read tag, then, memory leakage occurs. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Acked-by: Jeff Moyer <jmoyer@redhat.com> Link: https://lore.kernel.org/r/8caac123-9d45-c848-d45a-3cb8be5a2708@huawei.com --- ndctl/lib/libndctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index ad521d365ee4..392638259a5e 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -975,6 +975,7 @@ static void *add_bus(void *parent, int id, const char *ctl_base) free(bus->wait_probe_path); free(bus->scrub_path); free(bus->provider); + free(bus->bus_path); free(bus->bus_buf); free(bus); err_bus: -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor