From 9d7132dfeea6d7f95cfc982e69615c4f2c0bfbba Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 15 Sep 2016 17:37:52 +0300 Subject: [PATCH] A fix of use-after-free memory bug. --- njs/njs_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/njs/njs_vm.c b/njs/njs_vm.c index 260e2be4..f85b40a0 100644 --- a/njs/njs_vm.c +++ b/njs/njs_vm.c @@ -2588,7 +2588,6 @@ njs_vmcode_continuation(njs_vm_t *vm, njs_value_t *invld1, njs_value_t *invld2) skip = frame->skip; vm->frame = njs_function_previous_frame(frame); - (void) njs_function_frame_free(vm, frame); /* * If a retval is in a callee arguments scope it @@ -2606,6 +2605,7 @@ njs_vmcode_continuation(njs_vm_t *vm, njs_value_t *invld1, njs_value_t *invld2) } vm->current = cont->return_address; + (void) njs_function_frame_free(vm, frame); return 0; -- 2.47.3