From: Igor Sysoev Date: Thu, 15 Sep 2016 14:37:52 +0000 (+0300) Subject: A fix of use-after-free memory bug. X-Git-Tag: 0.1.3~16 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=9d7132dfeea6d7f95cfc982e69615c4f2c0bfbba;p=njs.git A fix of use-after-free memory bug. --- 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;