Welcome! Log In Create A New Profile

Advanced

[njs] Fixed memory-leak introduced in b840b7af946e.

Dmitry Volyntsev
January 16, 2020 11:36AM
details: https://hg.nginx.org/njs/rev/22e3b0285ad6
branches:
changeset: 1302:22e3b0285ad6
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu Jan 16 19:18:41 2020 +0300
description:
Fixed memory-leak introduced in b840b7af946e.

diffstat:

src/njs_json.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 6fccbc9f1288 -r 22e3b0285ad6 src/njs_json.c
--- a/src/njs_json.c Thu Jan 16 19:18:39 2020 +0300
+++ b/src/njs_json.c Thu Jan 16 19:18:41 2020 +0300
@@ -2011,6 +2011,9 @@ njs_vm_value_dump(njs_vm_t *vm, njs_str_
goto memory_error;
}

+ visited.separate = 0;
+ visited.pointer = 0;
+
goto done;
}

@@ -2226,10 +2229,10 @@ njs_vm_value_dump(njs_vm_t *vm, njs_str_
}
}

+done:
+
njs_arr_destroy(&visited);

-done:
-
ret = njs_chb_join(&chain, &str);
if (njs_slow_path(ret != NJS_OK)) {
goto memory_error;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed memory-leak introduced in b840b7af946e.

Dmitry Volyntsev 101 January 16, 2020 11:36AM



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

Online Users

Guests: 110
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