summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-07-03 16:03:46 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2014-07-03 16:03:46 (GMT)
commitd8b129f279ba3a25c633f600d457f408ab27114e (patch)
treef14cd378b117120e8edc9400de81f16a2571e597 /PC
parenta6237d822a977efc076399d00c6cf682d68b52e2 (diff)
parentad4690fcca5704277abece184d49b39a913029d4 (diff)
downloadcpython-d8b129f279ba3a25c633f600d457f408ab27114e.zip
cpython-d8b129f279ba3a25c633f600d457f408ab27114e.tar.gz
cpython-d8b129f279ba3a25c633f600d457f408ab27114e.tar.bz2
Closes #21151: Merge with 3.4
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index d23810b..63c437e 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -871,8 +871,10 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
/* ALSO handle ALL unknown data types here. Even if we can't
support it natively, we should handle the bits. */
default:
- if (value == Py_None)
+ if (value == Py_None) {
*retDataSize = 0;
+ *retDataBuf = NULL;
+ }
else {
Py_buffer view;