Skip to content

Commit

Permalink
Fix memory leak in the as_is decomposition handler
Browse files Browse the repository at this point in the history
  • Loading branch information
tom95858 committed Feb 21, 2024
1 parent 9dd76c4 commit ab3bf66
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ldms/src/decomp/as_is/decomp_as_is.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ static void __decomp_as_is_cfg_free(__decomp_as_is_cfg_t dcfg)
free(didx->col_idx);
free(didx->name);
}
free(dcfg->idxs);
free(dcfg);
}

Expand Down Expand Up @@ -588,8 +589,6 @@ __get_row_cfg(__decomp_as_is_cfg_t dcfg, ldms_set_t set)
}
if (drow->idxs) {
for (i = 0; i < drow->idx_count; i++) {
if (!drow->idxs[i].col_idx)
continue;
free(drow->idxs[i].col_idx);
}
free(drow->idxs);
Expand Down

0 comments on commit ab3bf66

Please sign in to comment.