1
1
diff --git a/src/iotjs.c b/src/iotjs.c
2
- index ef2be53..0720ec6 100644
2
+ index 5a93eb7..4a5a8bd 100644
3
3
--- a/src/iotjs.c
4
4
+++ b/src/iotjs.c
5
- @@ -246 ,6 +246 ,9 @@ terminate:
5
+ @@ -242 ,6 +242 ,9 @@ terminate:
6
6
iotjs_terminate(env);
7
7
8
8
exit:
@@ -13,7 +13,7 @@ index ef2be53..0720ec6 100644
13
13
iotjs_environment_config(env)->debugger->context_reset) {
14
14
iotjs_environment_release();
15
15
diff --git a/src/iotjs_util.c b/src/iotjs_util.c
16
- index abd7a86..453d597 100644
16
+ index abd7a86..cc6b4e3 100644
17
17
--- a/src/iotjs_util.c
18
18
+++ b/src/iotjs_util.c
19
19
@@ -75,12 +75,76 @@ iotjs_string_t iotjs_file_read(const char* path) {
@@ -93,7 +93,7 @@ index abd7a86..453d597 100644
93
93
return buffer;
94
94
}
95
95
96
- @@ -99,16 +163,30 @@ char* iotjs_buffer_allocate_from_number_array(size_t size,
96
+ @@ -99,17 +163,31 @@ char* iotjs_buffer_allocate_from_number_array(size_t size,
97
97
98
98
char* iotjs_buffer_reallocate(char* buffer, size_t size) {
99
99
IOTJS_ASSERT(buffer != NULL);
@@ -117,15 +117,16 @@ index abd7a86..453d597 100644
117
117
118
118
119
119
void iotjs_buffer_release(char* buffer) {
120
- + size_t size;
121
- + memcpy(&size, (buffer - SIZEOF_MM_ALLOCNODE), sizeof(size_t));
122
- + mem_stat_free(size - SIZEOF_MM_ALLOCNODE);
123
- +
124
120
if (buffer) {
121
+ + size_t size;
122
+ + memcpy(&size, (buffer - SIZEOF_MM_ALLOCNODE), sizeof(size_t));
123
+ + mem_stat_free(size - SIZEOF_MM_ALLOCNODE);
124
+ +
125
125
free(buffer);
126
126
}
127
+ }
127
128
diff --git a/src/iotjs_util.h b/src/iotjs_util.h
128
- index adccee2..318d6bd 100644
129
+ index a891604..786830e 100644
129
130
--- a/src/iotjs_util.h
130
131
+++ b/src/iotjs_util.h
131
132
@@ -23,6 +23,10 @@
0 commit comments