From: Dmitry Volyntsev Date: Fri, 3 Dec 2021 13:55:11 +0000 (+0000) Subject: Added memory exception if alloc fails for njs_vm_function_alloc. X-Git-Tag: 0.7.1~34 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=09f176c255f9bf665a66959efcb06d3464879b0b;p=njs.git Added memory exception if alloc fails for njs_vm_function_alloc. --- diff --git a/src/njs_function.c b/src/njs_function.c index e889c19d..4b07f3e3 100644 --- a/src/njs_function.c +++ b/src/njs_function.c @@ -72,6 +72,7 @@ njs_vm_function_alloc(njs_vm_t *vm, njs_function_native_t native) function = njs_mp_zalloc(vm->mem_pool, sizeof(njs_function_t)); if (njs_slow_path(function == NULL)) { + njs_memory_error(vm); return NULL; }