mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	Fix memory leaks in marsh.c - missing frees.
This commit is contained in:
		| @@ -427,6 +427,8 @@ int janet_marshal(JanetBuffer *buf, Janet x, int flags) { | ||||
|     if (!(status = setjmp(st.err))) | ||||
|         marshal_one(&st, x, flags); | ||||
|     janet_table_deinit(&st.seen); | ||||
|     janet_v_free(st.seen_envs); | ||||
|     janet_v_free(st.seen_defs); | ||||
|     return status; | ||||
| } | ||||
|  | ||||
| @@ -1015,6 +1017,8 @@ int janet_unmarshal( | ||||
|         if (next) *next = nextbytes; | ||||
|     } | ||||
|     janet_array_deinit(&st.lookup); | ||||
|     janet_v_free(st.lookup_defs); | ||||
|     janet_v_free(st.lookup_envs); | ||||
|     return status; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose