diff --git a/ldms/src/decomp/static/decomp_static.c b/ldms/src/decomp/static/decomp_static.c index f46dd2916..d51c5d10a 100644 --- a/ldms/src/decomp/static/decomp_static.c +++ b/ldms/src/decomp/static/decomp_static.c @@ -1792,13 +1792,13 @@ static int decomp_static_decompose(ldmsd_strgp_t strgp, ldms_set_t set, dup_row = row_cache_dup(cfg_row, mid_rbn, row); /* Apply functional operators to columns */ + struct ldmsd_row_list_s tmp_row_list; + int count; + count = ldmsd_row_cache_make_list(&tmp_row_list, + cfg_row->row_limit, + strgp->row_cache, + group_idx); for (j = 0; j < row->col_count; j++) { - struct ldmsd_row_list_s row_list; - int count = ldmsd_row_cache_make_list( - &row_list, - cfg_row->row_limit, - strgp->row_cache, - group_idx); cfg_col = &cfg_row->cols[j]; if (cfg_col->op != LDMSD_DECOMP_OP_NONE && count < cfg_row->row_limit) @@ -1809,7 +1809,7 @@ static int decomp_static_decompose(ldmsd_strgp_t strgp, ldms_set_t set, strgp->obj.name, count, cfg_row->row_limit, ldmsd_decomp_op_to_string(cfg_col->op), cfg_col->dst); - rc = op_table[cfg_col->op](&row_list, dup_row, j); + rc = op_table[cfg_col->op](&tmp_row_list, dup_row, j); } ldmsd_row_cache_idx_free(group_idx); row = dup_row;