Skip to content

Commit

Permalink
#207: Resource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Sep 21, 2020
1 parent 438d067 commit c51bba0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/regparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -7478,14 +7478,14 @@ prs_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, ScanEnv* env)
if (r != ONIG_NORMAL) goto err_clear;
}

r = node_new_callout(&node, ONIG_CALLOUT_OF_NAME, num, name_id, env);
if (r != ONIG_NORMAL) goto err_clear;

e = onig_reg_callout_list_at(env->reg, num);
if (IS_NULL(e)) {
r = ONIGERR_MEMORY; goto err_clear;
}

r = node_new_callout(&node, ONIG_CALLOUT_OF_NAME, num, name_id, env);
if (r != ONIG_NORMAL) goto err_clear;

e->of = ONIG_CALLOUT_OF_NAME;
e->in = in;
e->name_id = name_id;
Expand Down

0 comments on commit c51bba0

Please sign in to comment.