From efc6d4983245f2cea472a928428d9e236f68124f Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 28 May 2020 19:32:13 -0500 Subject: [PATCH] src/aiori-CEPHFS: Add option checks before init Signed-off-by: Mark Nelson --- src/aiori-CEPHFS.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/aiori-CEPHFS.c b/src/aiori-CEPHFS.c index 2c8d34b..0d38901 100755 --- a/src/aiori-CEPHFS.c +++ b/src/aiori-CEPHFS.c @@ -125,6 +125,12 @@ static option_help * CEPHFS_options(){ static void CEPHFS_Init() { + /* Short circuit if the options haven't been filled yet. */ + if (!o.user || !o.conf || !o.prefix) { + WARN("CEPHFS_Init() called before options have been populated!"); + return; + } + /* Short circuit if the mount handle already exists */ if (cmount) { return;