Skip to content

Commit

Permalink
Initialize variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed May 10, 2024
1 parent 93dd9c0 commit 7e396ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ CAPSTONE_EXPORT
cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
{
cs_err err;
struct cs_struct *ud;
struct cs_struct *ud = NULL;
if (!cs_mem_malloc || !cs_mem_calloc || !cs_mem_realloc || !cs_mem_free || !cs_vsnprintf)
// Error: before cs_open(), dynamic memory management must be initialized
// with cs_option(CS_OPT_MEM)
Expand Down Expand Up @@ -745,8 +745,8 @@ cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT
cs_err CAPSTONE_API cs_close(csh *handle)
{
struct cs_struct *ud;
struct insn_mnem *next, *tmp;
struct cs_struct *ud = NULL;
struct insn_mnem *next = NULL, *tmp = NULL;

if (*handle == 0)
// invalid handle
Expand Down

0 comments on commit 7e396ee

Please sign in to comment.