commit | 40db90c1ce1a59d5f5f2894bb0ce32110000bf27 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Thu Apr 20 21:19:31 2017 +0300 |
committer | GitHub <noreply@github.com> | Thu Apr 20 21:19:31 2017 +0300 |
tree | 0436658cf04e8ebd902a9bc1851b21ee7b98bf45 | |
parent | 8f5cdfa9fc1bb6b4d9a33fc281987252f6398430 [diff] [blame] |
bpo-29802: Fix reference counting in module-level struct functions (#1213) when pass arguments of wrong type.
diff --git a/Modules/_struct.c b/Modules/_struct.c index 4bc4186..a614be8 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c
@@ -2083,6 +2083,7 @@ if (fmt == NULL) { Py_DECREF(*ptr); + *ptr = NULL; return 1; }