Skip to content

Commit

Permalink
Fix memory allocation for DeboorNet. Fixes #237
Browse files Browse the repository at this point in the history
  • Loading branch information
Usuairo committed Mar 7, 2024
1 parent 18b5a93 commit bcfe9e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tinyspline.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ ts_int_deboornet_new(const tsBSpline *spline,
const size_t sof_real = sizeof(tsReal);
const size_t sof_impl = sizeof(struct tsDeBoorNetImpl);
const size_t sof_points_vec = fixed_num_points * dim * sof_real;
const size_t sof_net = sof_impl * sof_points_vec;
const size_t sof_net = sof_impl + sof_points_vec;

net->pImpl = (struct tsDeBoorNetImpl *) malloc(sof_net);
if (!net->pImpl) TS_RETURN_0(status, TS_MALLOC, "out of memory")
Expand Down

0 comments on commit bcfe9e6

Please sign in to comment.