Skip to content

Commit f06b70a

Browse files
albanDfacebook-github-bot
authored andcommitted
Fix memory leak during packing in tuples (#13305)
Summary: Verified on python 3.6 that it fixes #13243 Pull Request resolved: #13305 Differential Revision: D12838764 Pulled By: soumith fbshipit-source-id: 206a8b22d1d05e5f156f1db1baaa82358f3eaa83
1 parent 8a888c4 commit f06b70a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/utils/python_tuples.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inline void THPUtils_packInt64Array(PyObject *tuple, size_t size, const int64_t
1111
if (!i64) {
1212
throw python_error();
1313
}
14-
PyTuple_SET_ITEM(tuple, i, THPUtils_packInt64(sizes[i]));
14+
PyTuple_SET_ITEM(tuple, i, i64);
1515
}
1616
}
1717

0 commit comments

Comments
 (0)