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 //