[Python-checkins] cpython: fixd refleak
christian.heimes
python-checkins at python.org
Mon Jun 10 10:47:28 CEST 2013
http://hg.python.org/cpython/rev/6860263c05b3
changeset: 84077:6860263c05b3
user: Christian Heimes <christian at cheimes.de>
date: Mon Jun 10 10:47:22 2013 +0200
summary:
fixd refleak
files:
Modules/_ssl.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2775,6 +2775,7 @@
PyObject *ofile = NULL;
PyObject *odir_env = NULL;
PyObject *odir = NULL;
+ PyObject *tup = NULL;
#define convert(info, target) { \
const char *tmp = (info); \
@@ -2791,7 +2792,14 @@
convert(X509_get_default_cert_dir(), odir);
#undef convert
- return Py_BuildValue("(OOOO)", ofile_env, ofile, odir_env, odir);
+ if ((tup = PyTuple_New(4)) == NULL) {
+ goto error;
+ }
+ PyTuple_SET_ITEM(tup, 0, ofile_env);
+ PyTuple_SET_ITEM(tup, 1, ofile);
+ PyTuple_SET_ITEM(tup, 2, odir_env);
+ PyTuple_SET_ITEM(tup, 3, odir);
+ return tup;
error:
Py_XDECREF(ofile_env);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list