diff options
author | Zhidao HONG <z.hong@f5.com> | 2023-01-30 11:16:01 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2023-01-30 11:16:01 +0800 |
commit | 1f37d8121a3dfc2f039b859835c4ec22e77f01c9 (patch) | |
tree | b430de5baaf62bcbdaf6708dc54ba08809857f01 /src/nxt_js.h | |
parent | b2d19155787e7dd85f0a915bb74d4c9aa2cd91d6 (diff) | |
download | unit-1f37d8121a3dfc2f039b859835c4ec22e77f01c9.tar.gz unit-1f37d8121a3dfc2f039b859835c4ec22e77f01c9.tar.bz2 |
NJS: adding the missing vm destruction.
This commit fixed the njs memory leak happened in the config validation, updating and http requests.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_js.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_js.h b/src/nxt_js.h index dea43fe3..74d041ca 100644 --- a/src/nxt_js.h +++ b/src/nxt_js.h @@ -22,12 +22,14 @@ typedef struct { nxt_js_conf_t *nxt_js_conf_new(nxt_mp_t *mp); +void nxt_js_conf_release(nxt_js_conf_t *jcf); void nxt_js_set_proto(nxt_js_conf_t *jcf, njs_external_t *proto, nxt_uint_t n); nxt_js_t *nxt_js_add_tpl(nxt_js_conf_t *jcf, nxt_str_t *str, nxt_bool_t strz); nxt_int_t nxt_js_compile(nxt_js_conf_t *jcf); nxt_int_t nxt_js_test(nxt_js_conf_t *jcf, nxt_str_t *str, u_char *error); nxt_int_t nxt_js_call(nxt_task_t *task, nxt_js_cache_t *cache, nxt_js_t *js, nxt_str_t *str, void *ctx); +void nxt_js_release(nxt_js_cache_t *cache); extern njs_int_t nxt_js_proto_id; |