From: George Joseph Date: Wed, 2 Apr 2025 14:44:00 +0000 (-0600) Subject: ari_websockets: Fix frack if ARI config fails to load. X-Git-Tag: 21.9.0-rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9676754857dce3fc76ececa018ac24c593a87af0;p=thirdparty%2Fasterisk.git ari_websockets: Fix frack if ARI config fails to load. ari_ws_session_registry_dtor() wasn't checking that the container was valid before running ao2_callback on it to shutdown registered sessions. (cherry picked from commit 62e73f9bd8d50598ff9a71350ab01f20c988aaf7) --- diff --git a/res/ari/ari_websockets.c b/res/ari/ari_websockets.c index ef75fd85e8..3712dd7d10 100644 --- a/res/ari/ari_websockets.c +++ b/res/ari/ari_websockets.c @@ -697,6 +697,10 @@ static int ari_ws_session_shutdown_cb(void *ari_ws_session, void *arg, int flags static void ari_ws_session_registry_dtor(void) { + if (!ari_ws_session_registry) { + return; + } + ao2_callback(ari_ws_session_registry, OBJ_MULTIPLE | OBJ_NODATA, ari_ws_session_shutdown_cb, NULL);