From: Alan T. DeKok Date: Fri, 26 May 2017 19:01:30 +0000 (-0400) Subject: don't lock if there's no interpreter. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd2731052018781b0327dcb2da98197e7373dde7;p=thirdparty%2Ffreeradius-server.git don't lock if there's no interpreter. Mainly to shut up coverity. CID #1400046 --- diff --git a/src/modules/rlm_lua/lua.c b/src/modules/rlm_lua/lua.c index 9bc4f8544fc..904dccdf7f5 100644 --- a/src/modules/rlm_lua/lua.c +++ b/src/modules/rlm_lua/lua.c @@ -818,6 +818,8 @@ static lua_State *rlm_lua_get_interp(rlm_lua_t const *inst) { * and return the instance specific interpreter. */ if (!inst->threads) { + if (!inst->interpreter) return NULL; + pthread_mutex_lock(inst->mutex); return inst->interpreter; }