Issue #17810: return -1 on error
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index b63a7d9..6de94ec 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -2941,7 +2941,7 @@
 
     iter = PyObject_GetIter(obj);
     if (iter == NULL) {
-        return NULL;
+        return -1;
     }
     for (;;) {
         PyObject *item;