Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
tcsh.19069
tcsh-6.18.01-history-stderror-jmp.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tcsh-6.18.01-history-stderror-jmp.patch of Package tcsh.19069
--- sh.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) --- sh.c +++ sh.c 2019-09-26 07:54:47.733054241 +0000 @@ -1547,13 +1547,15 @@ srcfile(const char *f, int onlyown, int fl.l_len = 0; hd = xmalloc(sizeof(*hd)); - cleanup_push(hd, xfree); + if (hd) { + cleanup_push(hd, xfree); - *hd = fcntl(unit, F_DUPFD_CLOEXEC, FSAFE+1); - cleanup_push(hd, open_cleanup); + *hd = fcntl(unit, F_DUPFD_CLOEXEC, FSAFE+1); + cleanup_push(hd, open_cleanup); - fcntl(*hd, F_SETLKW, &fl); - cleanup_push(hd, fcntl_cleanup); + fcntl(*hd, F_SETLKW, &fl); + cleanup_push(hd, fcntl_cleanup); + } } cleanup_push(&unit, open_cleanup); @@ -2206,7 +2208,7 @@ dosource(Char **t, struct command *c) int dosource_flg(Char **t, struct command *c, int flg) { - Char *f; + Char *f, **globbed; char *file; int fd; int newflg = 0; @@ -2229,12 +2231,18 @@ dosource_flg(Char **t, struct command *c cleanup_push(file, xfree); xfree(f); t = glob_all_or_error(t); + globbed = t; + cleanup_push(globbed, blk_cleanup); fd = srcfile(file, 0, (flg | newflg), t); - if ((!fd) && (!newflg) && (!bequiet)) + if ((!fd) && (!newflg) && (!bequiet)) { + (void)cleanup_push_mark(); stderror(ERR_SYSTEM, file, strerror(errno)); + } /* We need to preserve fd and it's cleaning routines on the top of the * cleaning stack. Don't call cleanup_until() but clean it manually. */ + cleanup_ignore(globbed); + blk_cleanup(globbed); cleanup_ignore(file); xfree(file);
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