From 1c607662eb952ecafad08e9774c87aa8676eb836 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Sat, 13 Jul 2024 06:17:51 +0100 Subject: status: Add a missing check for potential NULL Fixes: 707f4ef8 ("status: Show list of loaded language modules") Signed-off-by: Andrew Clayton --- src/nxt_status.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nxt_status.c') diff --git a/src/nxt_status.c b/src/nxt_status.c index b48ec743..92cbf2e6 100644 --- a/src/nxt_status.c +++ b/src/nxt_status.c @@ -107,6 +107,10 @@ nxt_status_get(nxt_status_report_t *report, nxt_mp_t *mp) if (lang_cnts[type] > 1) { obj = nxt_conf_create_object(mp, 2); + if (nxt_slow_path(obj == NULL)) { + return NULL; + } + nxt_conf_set_element(mod_obj, a++, obj); } -- cgit