summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/bsddbmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c
index ecfb653..be50208 100644
--- a/Modules/bsddbmodule.c
+++ b/Modules/bsddbmodule.c
@@ -427,7 +427,7 @@ bsddb_keys(bsddbobject *dp, PyObject *args)
if (data != NULL) memcpy(data,krec.data,krec.size);
}
BSDDB_END_SAVE(dp)
- if (data==NULL) return PyErr_NoMemory();
+ if (status == 0 && data==NULL) return PyErr_NoMemory();
while (status == 0) {
if (dp->di_type == DB_RECNO)
item = PyInt_FromLong(*((int*)data));