Currently, we do not check if the argument of afsconf_Close /
afsconf_CloseInternal is equal to null. In order to avoid a possible
segmentation fault, add the checks.
Reviewed-on: https://gerrit.openafs.org/13352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
(cherry picked from commit
bd58bb85004a18bb6681ff2b0c13a04e23c4d9c4)
Change-Id: I6a99b559ab863c8485af9ec17c940b64cf844acf
Reviewed-on: https://gerrit.openafs.org/13372
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
int
afsconf_Close(struct afsconf_dir *adir)
{
+ if (adir == NULL) {
+ return 0;
+ }
+
LOCK_GLOBAL_MUTEX;
afsconf_CloseInternal(adir);
if (adir->name)
struct afsconf_aliasentry *ta, *na;
char *tname;
+ if (adir == NULL) {
+ return 0;
+ }
+
tname = adir->name; /* remember name, since that's all we preserve */
/* free everything we can find */