Skip to content

Commit

Permalink
module_funcs_clear: fix an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 16, 2024
1 parent c1c3cb1 commit 97c7265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,10 +1531,10 @@ read_element_section(const uint8_t **pp, const uint8_t *ep,
static void
module_funcs_clear(struct mem_context *mctx, struct module *m, uint32_t nfuncs)
{
assert((m->funcs == NULL) == (nfuncs == 0));
if (m->funcs == NULL) {
return;
}
assert(nfuncs > 0);
uint32_t i;
for (i = 0; i < nfuncs; i++) {
clear_func(mctx, &m->funcs[i]);
Expand Down

0 comments on commit 97c7265

Please sign in to comment.