From 1d57148e951240cad4b8f51c09c236f16076f51e Mon Sep 17 00:00:00 2001 From: Andrew Hanushevsky Date: Tue, 23 Jun 2020 15:59:50 -0700 Subject: [PATCH] [Utils] Don't hide true error when loading a plugin w/o an alternate. --- src/XrdOuc/XrdOucPinLoader.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/XrdOuc/XrdOucPinLoader.cc b/src/XrdOuc/XrdOucPinLoader.cc index 832b94b9e12..74b903ab53d 100644 --- a/src/XrdOuc/XrdOucPinLoader.cc +++ b/src/XrdOuc/XrdOucPinLoader.cc @@ -230,11 +230,16 @@ bool XrdOucPinLoader::LoadLib(int mcnt) if (eDest) eDest->Say("Plugin ", dName, " ", theLib, " not found; falling back to using ", altLib); -// Readjust library pointers +// if we have an alternative, readjust library pointers // - free(theLib); - theLib = altLib; - altLib = 0; + if (altLib) + {free(theLib); + theLib = altLib; + altLib = 0; + } else { + badLib = true; + return false; + } // Try once more //