Skip to content

Commit

Permalink
fix minor memleak
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Sep 8, 2015
1 parent 67991a7 commit df5eb9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ void pinba_update_tag2_info_delete(size_t request_id, void *rep, const pinba_sta

if (UNLIKELY(data->req_count == 0)) {
if (pinba_map_delete(report->results, index_val) < 0) {
pinba_map_destroy(report->results);
report->results = NULL;
pinba_map_destroy(report->results);
report->results = NULL;
}
free(data);
report->std.results_cnt--;
Expand Down Expand Up @@ -2472,6 +2472,10 @@ void pinba_tag_report_dtor(pinba_tag_report *report, int lock_tag_reports) /* {{
pinba_std_report_dtor(report);
free(report->tag_id);

if (report->index) {
free(report->index);
}

if (report->words) {
free(report->words);
}
Expand Down

0 comments on commit df5eb9a

Please sign in to comment.