summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-06-10 08:47:22 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-06-10 08:47:22 (GMT)
commit75b84266987737fe87c120e871bcd1f0261c9ae8 (patch)
tree829d83e53dc6a29b05af3decb2ba00a2bacbb711 /Modules
parent36451f076ba302c04bd511cd62f54fffc8e35d9b (diff)
downloadcpython-75b84266987737fe87c120e871bcd1f0261c9ae8.zip
cpython-75b84266987737fe87c120e871bcd1f0261c9ae8.tar.gz
cpython-75b84266987737fe87c120e871bcd1f0261c9ae8.tar.bz2
fixd refleak
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 5959f18..aab288b 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2775,6 +2775,7 @@ get_default_verify_paths(PyObject *self)
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 @@ get_default_verify_paths(PyObject *self)
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);