summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/pwdmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index 1286e7d..fd11f84 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -145,6 +145,7 @@ pwd_getpwuid(PyObject *module, PyObject *uidobj)
while(1) {
buf2 = PyMem_RawRealloc(buf, bufsize);
if (buf2 == NULL) {
+ p = NULL;
nomem = 1;
break;
}
@@ -227,6 +228,7 @@ pwd_getpwnam_impl(PyObject *module, PyObject *name)
while(1) {
buf2 = PyMem_RawRealloc(buf, bufsize);
if (buf2 == NULL) {
+ p = NULL;
nomem = 1;
break;
}