summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-11-14 23:14:42 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-11-14 23:14:42 (GMT)
commitfcc2e71e99edb668cad539dc8fa9f259d0b389b6 (patch)
treeab5c934afb2df480e5a1bb949974ace99a42ab09 /Modules/_ssl.c
parent7e2b870b8593233306594237cd5286c60ec7a1e1 (diff)
parent025a1fd9907bb439db9a812c78b8f18dbf4bad9e (diff)
downloadcpython-fcc2e71e99edb668cad539dc8fa9f259d0b389b6.zip
cpython-fcc2e71e99edb668cad539dc8fa9f259d0b389b6.tar.gz
cpython-fcc2e71e99edb668cad539dc8fa9f259d0b389b6.tar.bz2
merge 3.4 (#25578)
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 784040d..67402fe 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1017,7 +1017,10 @@ _get_aia_uri(X509 *certificate, int nid) {
AUTHORITY_INFO_ACCESS *info;
info = X509_get_ext_d2i(certificate, NID_info_access, NULL, NULL);
- if ((info == NULL) || (sk_ACCESS_DESCRIPTION_num(info) == 0)) {
+ if (info == NULL)
+ return Py_None;
+ if (sk_ACCESS_DESCRIPTION_num(info) == 0) {
+ AUTHORITY_INFO_ACCESS_free(info);
return Py_None;
}
@@ -3967,7 +3970,7 @@ _ssl_get_default_verify_paths_impl(PyModuleDef *module)
else if ((target = PyUnicode_DecodeFSDefault(tmp)) == NULL) { \
target = PyBytes_FromString(tmp); } \
if (!target) goto error; \
- }
+ }
CONVERT(X509_get_default_cert_file_env(), ofile_env);
CONVERT(X509_get_default_cert_file(), ofile);