aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/pywrap_tfe.i
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-10-08 12:34:00 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-08 12:38:14 -0700
commitd3595b1534a855f3d0da35d3f1dd8b5d464b1b70 (patch)
treed3a7d04b452d882e6001b470666bc3b31923e97d /tensorflow/python/pywrap_tfe.i
parentfb2807c70de107eb55fb6e8fff2bb8a7e4284ea9 (diff)
Fix a couple of reference leaks
PiperOrigin-RevId: 216230391
Diffstat (limited to 'tensorflow/python/pywrap_tfe.i')
-rwxr-xr-xtensorflow/python/pywrap_tfe.i1
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/python/pywrap_tfe.i b/tensorflow/python/pywrap_tfe.i
index 61e0abbfcb..adbce95c6f 100755
--- a/tensorflow/python/pywrap_tfe.i
+++ b/tensorflow/python/pywrap_tfe.i
@@ -209,6 +209,7 @@ limitations under the License.
SWIG_fail;
} else {
int num_outputs = $1->size();
+ Py_CLEAR($result);
$result = PyList_New(num_outputs);
for (int i = 0; i < num_outputs; ++i) {
PyObject *output;