Skip to content

Commit

Permalink
fix reference count
Browse files Browse the repository at this point in the history
  • Loading branch information
Depetrol committed Oct 17, 2024
1 parent 80f3b5e commit 858885a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/lf_token.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ lf_token_t* _lf_initialize_token_with_value(token_template_t* tmplt, void* value
LF_PRINT_DEBUG("_lf_initialize_token_with_value: template %p, value %p", (void*)tmplt, value);

lf_token_t* result = _lf_new_token((token_type_t*)tmplt, value, 0);
result->ref_count = 1;
// Count allocations to issue a warning if this is never freed.
#if !defined NDEBUG
LF_CRITICAL_SECTION_ENTER(GLOBAL_ENVIRONMENT);
Expand Down

0 comments on commit 858885a

Please sign in to comment.