提交 57597472 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Decref the right variable in case of error

上级 468d8c84
......@@ -1064,7 +1064,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
if(!CudaNdarray_is_c_contiguous(indices) != 0) {
PyErr_SetString(PyExc_NotImplementedError,
"CudaNdarray_TakeFrom: The indices must be contiguous in memory.");
Py_DECREF(indices_obj);
Py_DECREF(indices);
return NULL;
}
int nb_indices = CudaNdarray_SIZE((CudaNdarray *)indices) / 2;// int64 are 8 bytes, float32 are 4 bytes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论