* more details.
*
* You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <dlfcn.h>
soname = NULL;
exit(EXIT_FAILURE);
}
- free(soname);
- soname = NULL;
privctx->loadeddbctx = backend_init(dbcfg, readonly);
+ if (privctx->loadeddbctx == NULL) {
+ logthing(LOGTHING_CRITICAL,
+ "Failed to initialise dynamic backend: %s",
+ soname);
+ free(soname);
+ soname = NULL;
+ exit(EXIT_FAILURE);
+ }
+ free(soname);
+ soname = NULL;
+
if (privctx->loadeddbctx != NULL) {
dbctx->cleanupdb = dynamic_cleanupdb;
dbctx->starttrans = dynamic_starttrans;