Skip to content

Commit

Permalink
fix memory leak in V3fArrayFromBuffer (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
cary-ilm authored Oct 13, 2022
1 parent 98cd3e6 commit 7206ad1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/python/PyImath/PyImathBufferProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ fixedArrayFromBuffer (PyObject *obj)

ArrayT *array = new ArrayT (view.shape[0], PyImath::UNINITIALIZED);
memcpy (&array->direct_index(0), view.buf, view.len);
PyBuffer_Release(&view);

return array;
}
Expand Down

0 comments on commit 7206ad1

Please sign in to comment.