Projects
Mega:23.09
bash
_service:tar_scm:backport-fix-small-memleak-in-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-fix-small-memleak-in-globbing.patch of Package bash
From 829aad36dbbeee462fa142fe2c571fd7ab735ba8 Mon Sep 17 00:00:00 2001 From: Chet Ramey <chet.ramey@case.edu> Date: Mon, 26 Jun 2023 17:09:08 -0400 Subject: [PATCH] backport part of patch to fix small memleak in globbing --- lib/glob/glob.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/glob/glob.c b/lib/glob/glob.c index b66af85..e4283bd 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -1446,6 +1446,12 @@ glob_filename (pathname, flags) free ((char *) array); else if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') free (temp_results); /* expanding ** case above */ + else if (array == temp_results) + /* If array == temp_results, either we assigned it above or + glob_dir_to_array returned temp_results because the dirname + was the empty string. In any case, we assume temp_results + has not been freed, and free it here. */ + free (temp_results); if (shouldbreak) break; -- 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