Skip to content

Commit

Permalink
vc: avoid a free(NULL)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Jul 11, 2023
1 parent d1677c8 commit c27377f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ static tree_t create_tree(const faest_paramset_t* params, unsigned int depth) {
return tree;
}

static void free_tree(tree_t* tree) {
if (tree != NULL) {
free(tree->nodes);
tree->nodes = NULL;
}
}

static ATTR_CONST size_t get_parent(size_t node) {
assert(node != 0);

Expand Down Expand Up @@ -160,7 +153,6 @@ void vector_commitment(const uint8_t* rootKey, const uint8_t* iv, const faest_pa
}

tree.nodes = NULL;
free_tree(&tree);

// Step: 6
H1_context_t h1_ctx;
Expand Down

0 comments on commit c27377f

Please sign in to comment.