mirror of
https://github.com/johnkerl/miller.git
synced 2026-08-02 12:32:21 +00:00
valgrind findings
This commit is contained in:
parent
d054cad7cd
commit
bd30d8a40c
2 changed files with 5 additions and 2 deletions
|
|
@ -56,8 +56,6 @@ local_stack_frame_t* local_stack_frame_enter(local_stack_frame_t* pframe) {
|
|||
// ----------------------------------------------------------------
|
||||
void local_stack_frame_exit (local_stack_frame_t* pframe) {
|
||||
MLR_INTERNAL_CODING_ERROR_UNLESS(mlhmmv_xvalue_is_absent_and_nonterminal(&pframe->pvars[0].xvalue));
|
||||
for (int i = 0; i < pframe->size; i++)
|
||||
mlhmmv_xvalue_free(&pframe->pvars[i].xvalue);
|
||||
if (!pframe->ephemeral) {
|
||||
pframe->in_use = FALSE;
|
||||
LOCAL_STACK_TRACE(printf("LOCAL STACK FRAME NON-EPH EXIT %p %d\n", pframe, pframe->size));
|
||||
|
|
|
|||
|
|
@ -189,6 +189,11 @@ static inline void local_stack_subframe_exit(local_stack_frame_t* pframe, int co
|
|||
LOCAL_STACK_TRACE(printf("LOCAL STACK SUBFRAME %p EXIT %d->%d\n",
|
||||
pframe, pframe->subframe_base, pframe->subframe_base-count));
|
||||
pframe->subframe_base -= count;
|
||||
local_stack_frame_entry_t* psubframe = &pframe->pvars[pframe->subframe_base];
|
||||
for (int i = 0; i < count; i++) {
|
||||
local_stack_frame_entry_t* pentry = &psubframe[i];
|
||||
mlhmmv_xvalue_free(&pentry->xvalue);
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue