Welcome! Log In Create A New Profile

Advanced

[njs] Added memory exception if alloc fails for njs_vm_function_alloc.

Dmitry Volyntsev
December 03, 2021 08:58AM
details: https://hg.nginx.org/njs/rev/b27244641dbf
branches:
changeset: 1756:b27244641dbf
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Dec 03 13:55:11 2021 +0000
description:
Added memory exception if alloc fails for njs_vm_function_alloc.

diffstat:

src/njs_function.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 748eca39acb3 -r b27244641dbf src/njs_function.c
--- a/src/njs_function.c Tue Nov 30 14:55:57 2021 +0000
+++ b/src/njs_function.c Fri Dec 03 13:55:11 2021 +0000
@@ -72,6 +72,7 @@ njs_vm_function_alloc(njs_vm_t *vm, njs_

function = njs_mp_zalloc(vm->mem_pool, sizeof(njs_function_t));
if (njs_slow_path(function == NULL)) {
+ njs_memory_error(vm);
return NULL;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Added memory exception if alloc fails for njs_vm_function_alloc.

Dmitry Volyntsev 262 December 03, 2021 08:58AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 166
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready