diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-07-13 06:17:51 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-07-13 06:17:51 +0100 |
commit | 1c607662eb952ecafad08e9774c87aa8676eb836 (patch) | |
tree | d508ec6839b432025a82c34d6e30ebe9d673879f /src | |
parent | ebb10b0ad3fc120b5ad219f9155c80311693f5af (diff) | |
download | unit-1c607662eb952ecafad08e9774c87aa8676eb836.tar.gz unit-1c607662eb952ecafad08e9774c87aa8676eb836.tar.bz2 |
status: Add a missing check for potential NULL
Fixes: 707f4ef8 ("status: Show list of loaded language modules")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_status.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |