Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0178-Manage-Manage_subdevs-fix-file-descriptor-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0178-Manage-Manage_subdevs-fix-file-descriptor-leak.patch of Package mdadm.5365
From cc5083d114c4c88bc9477c2773b4b2426c4621e7 Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Mon, 7 Mar 2016 13:53:43 -0500 Subject: [PATCH 241/359] Manage: Manage_subdevs() fix file descriptor leak References: bsc#1081910 Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- Manage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Manage.c b/Manage.c index a812ba0..ab4ac09 100644 --- a/Manage.c +++ b/Manage.c @@ -1508,9 +1508,10 @@ int Manage_subdevs(char *devname, int fd, } else { struct stat stb; tfd = dev_open(dv->devname, O_RDONLY); - if (tfd >= 0) + if (tfd >= 0) { fstat(tfd, &stb); - else { + close(tfd); + } else { int open_err = errno; if (stat(dv->devname, &stb) != 0) { pr_err("Cannot find %s: %s\n", -- 2.16.1
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