diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2021-09-22 19:28:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 18:28:38 -0500 |
commit | 0ed58f8b3eabb82f82176f58a311d7e3a0d4da32 (patch) | |
tree | 55ffa03f261986e3ecacd3ef8d4cc9dc2d361e15 /numpy/array_api/_manipulation_functions.py | |
parent | 24c4436b38b0507d757b996a4bd54ce2a9585dd0 (diff) | |
download | numpy-0ed58f8b3eabb82f82176f58a311d7e3a0d4da32.tar.gz |
BUG: ufunc: Fix potential memory leak. (#19925)
* BUG: ufunc: Fix potential memory leak.
Change a return statement to 'goto fail;' to ensure that memory
previously allocated with PyArray_malloc() is freed. (The memory
pointers are 'funcdata' and 'newtypes'.)
The return *value* in this case is also changed, from 0 to -1, to indicate
that an error occurred. The exceptional return occurs because an unexpected
error occurred in the call to PyDict_GetItemWithError.
Closes gh-19548.
Diffstat (limited to 'numpy/array_api/_manipulation_functions.py')
0 files changed, 0 insertions, 0 deletions