mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-20 18:10:07 +00:00
valgrind findings
This commit is contained in:
parent
709e1cef97
commit
54ae57cd6f
1 changed files with 5 additions and 3 deletions
|
|
@ -140,9 +140,11 @@ static mapper_t* mapper_histogram_alloc(ap_state_t* pargp, slls_t* value_field_n
|
|||
static void mapper_histogram_free(mapper_t* pmapper) {
|
||||
mapper_histogram_state_t* pstate = pmapper->pvstate;
|
||||
slls_free(pstate->value_field_names);
|
||||
for (lhmsve_t* pe = pstate->pcounts_by_field->phead; pe != NULL; pe = pe->pnext) {
|
||||
unsigned long long* pcounts = pe->pvvalue;
|
||||
free(pcounts);
|
||||
if (pstate->pcounts_by_field != NULL) {
|
||||
for (lhmsve_t* pe = pstate->pcounts_by_field->phead; pe != NULL; pe = pe->pnext) {
|
||||
unsigned long long* pcounts = pe->pvvalue;
|
||||
free(pcounts);
|
||||
}
|
||||
}
|
||||
lhmsv_free(pstate->pcounts_by_field);
|
||||
ap_free(pstate->pargp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue