]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't put business logic into an assertion
authorAlan T. DeKok <aland@freeradius.org>
Mon, 14 Nov 2016 17:54:02 +0000 (12:54 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 14 Nov 2016 17:54:02 +0000 (12:54 -0500)
src/modules/rlm_lua/rlm_lua.c

index 633812865120380a24fdd36fbe638c01d7451e89..6be707a6721cc550cea44939e1e4245e3cf1e794 100644 (file)
@@ -85,7 +85,8 @@ static void _tls_interp_destroy(void *ctx)
         *      we free this context, which should in turn call a destructor which will
         *      call lua_close and free the actual interpreter.
         */
-       rad_assert(inst = talloc_find_parent_bytype(marker, rlm_lua_t));
+       inst = talloc_find_parent_bytype(marker, rlm_lua_t);
+       rad_assert(inst != NULL);
        pthread_mutex_lock(inst->mutex);
        talloc_free(marker);
        pthread_mutex_unlock(inst->mutex);