Projects
Factory:RISC-V:Base
rpm
_service:tar_scm:backport-Fix-fileleak-when-url...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-Fix-fileleak-when-urlGetFile-fails-in-rpmInstall.patch of Package rpm
From af81c95114bc2c01f005f15f17646a5188b5855d Mon Sep 17 00:00:00 2001 From: xujing <xujing125@huawei.com> Date: Mon, 28 Nov 2022 11:34:24 +0800 Subject: [PATCH 3/3] Fix fileleak when urlGetFile fails in rpmInstall The "tfn" is created by calling rpmMkTempFile but not unlinked when urlGetFile fails in rpmInstall. Fix it. --- lib/rpminstall.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 90474fabf..c89ca30b5 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -520,7 +520,10 @@ restart: _("skipping %s - transfer failed\n"), fileURL); eiu->numFailed++; eiu->pkgURL[eiu->pkgx] = NULL; - tfn = _free(tfn); + if (tfn) { + (void) unlink(tfn); + tfn = _free(tfn); + } break; } eiu->pkgState[eiu->pkgx] = 1; -- 2.27.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