Skip to content

Commit 8e04316

Browse files
committed
cpu: x64: uni_ncsp: fix memory leak
1 parent 95b1ab8 commit 8e04316

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cpu/x64/jit_uni_ncsp_convolution.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ status_t reduction_helper_t::reshape_weights(
100100
status_t reduction_helper_t::reshape_for_transpose(
101101
memory_desc_t &o_md, memory_desc_t &i_md) {
102102
const int ndims = i_md.ndims;
103-
int *perm = new int[ndims];
103+
std::vector<int> perm(ndims);
104104
for (int dim = 0; dim < ndims; dim++) {
105105
if (dim == ndims - 2)
106106
perm[dim] = dim + 1;
@@ -109,7 +109,7 @@ status_t reduction_helper_t::reshape_for_transpose(
109109
else
110110
perm[dim] = dim;
111111
}
112-
return memory_desc_permute_axes(o_md, i_md, perm);
112+
return memory_desc_permute_axes(o_md, i_md, perm.data());
113113
}
114114

115115
bool reduction_helper_t::is_gemm() {

0 commit comments

Comments
 (0)