Skip to content

Commit

Permalink
core/analysis: remove globals (#4057)
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka authored Jan 1, 2024
1 parent 0440ab4 commit 26aacfe
Show file tree
Hide file tree
Showing 6 changed files with 785 additions and 760 deletions.
6 changes: 6 additions & 0 deletions librz/analysis/analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ RZ_API RzAnalysis *rz_analysis_new(void) {
free(analysis);
return NULL;
}
analysis->esilinterstate = RZ_NEW0(RzAnalysisEsilInterState);
if (!analysis->esilinterstate) {
free(analysis);
return NULL;
}
analysis->bb_tree = NULL;
analysis->ht_addr_fun = ht_up_new0();
analysis->ht_name_fun = ht_pp_new0();
Expand Down Expand Up @@ -178,6 +183,7 @@ RZ_API RzAnalysis *rz_analysis_free(RzAnalysis *a) {
rz_analysis_esil_free(a->esil);
a->esil = NULL;
}
free(a->esilinterstate);
free(a->last_disasm_reg);
rz_list_free(a->imports);
rz_str_constpool_fini(&a->constpool);
Expand Down
Loading

0 comments on commit 26aacfe

Please sign in to comment.