Skip to content

Commit

Permalink
Free read_member if we've allocated it
Browse files Browse the repository at this point in the history
  • Loading branch information
nirosys committed Oct 18, 2023
1 parent 0e031c4 commit d8240e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions amazon/ion/ioncmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,10 @@ iERR ionc_read_value(hREADER hreader, ION_TYPE t, PyObject* container, BOOL in_s
}
}

if (decimal_value.type == ION_DECIMAL_TYPE_QUAD) {
free(read_number);
}

ion_nature_constructor = _ionpydecimal_cls;
break;
}
Expand Down

0 comments on commit d8240e3

Please sign in to comment.