Mercurial > repos > blastem
comparison gen_x86.c @ 1586:5453aafa0656
Fix memory leak in prep_args
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 18 Jun 2018 00:50:29 -0700 |
parents | 723f6381cffa |
children | 37afb9cf58be |
comparison
equal
deleted
inserted
replaced
1585:15116d4fdf40 | 1586:5453aafa0656 |
---|---|
2150 } | 2150 } |
2151 for (int i = stack_args -1; i >= 0; i--) | 2151 for (int i = stack_args -1; i >= 0; i--) |
2152 { | 2152 { |
2153 push_r(code, arg_arr[i]); | 2153 push_r(code, arg_arr[i]); |
2154 } | 2154 } |
2155 free(arg_arr); | |
2155 | 2156 |
2156 return stack_args * sizeof(void *) + adjust; | 2157 return stack_args * sizeof(void *) + adjust; |
2157 } | 2158 } |
2158 | 2159 |
2159 void call_args(code_info *code, code_ptr fun, uint32_t num_args, ...) | 2160 void call_args(code_info *code, code_ptr fun, uint32_t num_args, ...) |