Skip to content

Commit

Permalink
Fix bad Windows free in dimshuffle.c
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Jan 18, 2022
1 parent c34f37f commit c575da2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aesara/tensor/c_code/dimshuffle.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ int APPLY_SPECIFIC(cpu_dimshuffle)(PyArrayObject *input, PyArrayObject **res,
npy_intp N_shuffle = PyArray_SIZE(params->shuffle);
npy_intp N_augment = PyArray_SIZE(params->augment);
npy_intp N = N_augment + N_shuffle;
npy_intp *_reshape_shape = (npy_intp *)malloc(N * sizeof(npy_intp));
npy_intp *_reshape_shape = PyDimMem_NEW(N);

if (_reshape_shape == NULL) {
PyErr_NoMemory();
free(_reshape_shape);
return 1;
}

Expand Down

0 comments on commit c575da2

Please sign in to comment.