OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-399-g2a061e3
Gerrit Code Review
gerrit@openafs.org
Fri, 5 Dec 2025 11:50:31 -0500
The following commit has been merged in the master branch:
commit 2a061e33da9fbdfc8cc6bcb3f4ab23bb70c2a492
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Dec 3 20:23:46 2025 -0500
pts: Clean up source stack before exit
The 'pts source' command can be nested since the source file can contain
'source <filename>' commands, so pts maintains a stack of source FILE
pointers. Normally, the 'pts source' stack elements are cleaned up when
the last line is read from the source file, but if a 'quit' command or
syntax error is encountered, pts exits before cleaning up the 'pts source'
stack elements.
Add a destructor block to the pts.c main() function to run the cleanup
before exiting.
Free the 'pts source' stack and close the open source file handles in the
CleanUp() function. Change the shead global (the pointer to the head of
the source static) to a static variable to limit its scope.
Change-Id: I05cf8471cc3f6d280190ff51a5ee5e41607fdd18
Reviewed-on: https://gerrit.openafs.org/16638
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
src/ptserver/pts.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository