From c575da2cca32413c73e34f9b51f83b0821836e27 Mon Sep 17 00:00:00 2001 From: "Brandon T. Willard" Date: Mon, 17 Jan 2022 17:08:07 -0600 Subject: [PATCH] Fix bad Windows free in dimshuffle.c --- aesara/tensor/c_code/dimshuffle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aesara/tensor/c_code/dimshuffle.c b/aesara/tensor/c_code/dimshuffle.c index a84d99b7f8..d97df5254b 100644 --- a/aesara/tensor/c_code/dimshuffle.c +++ b/aesara/tensor/c_code/dimshuffle.c @@ -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; }