Rizin
unix-like reverse engineering framework and cli tools
cycles.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2014-2020 condret <condr3t@protonmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_analysis.h>
5 #include <rz_list.h>
6 #include <rz_types.h>
7 
10  if (cf) {
11  if (!(cf->hooks = rz_list_new())) {
12  RZ_FREE(cf);
13  }
14  }
15  return cf;
16 }
17 
19  if (!cf) {
20  return;
21  }
22  rz_list_free(cf->hooks);
23  free(cf);
24 }
#define RZ_API
RZ_API void rz_analysis_cycle_frame_free(RzAnalysisCycleFrame *cf)
Definition: cycles.c:18
RZ_API RzAnalysisCycleFrame * rz_analysis_cycle_frame_new(void)
Definition: cycles.c:8
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
Definition: list.c:235
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define RZ_FREE(x)
Definition: rz_types.h:369