Hi Steve,I am still learning how to answer to patches, and I guess because of this you didn't notice my comment at the bottom. I think you have to remove the line
free_record(rec); You don't have to send me another patch. Thanks! Yordan On 4.07.2018 14:39, Yordan Karadzhov (VMware) wrote:
+ rec = rec_list[next_cpu]->rec; + rows[count] = rec; - ++count; + pid = pevent_data_pid(kshark_ctx->pevent, rec); + task = kshark_add_task(kshark_ctx, pid); + if (!task) + goto fail; + + temp_rec = rec_list[next_cpu]; + rec_list[next_cpu] = rec_list[next_cpu]->next; + free(temp_rec); + free_record(rec);You have to free only the element of the list. The user is responsible for freeing the record.+ } } - free(cpu_list); + free_rec_list(rec_list, n_cpus);*data_rows = rows;