Fix reference leak in _pickle.
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 5564803..a8d6684 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5039,11 +5039,13 @@
             if (result == NULL) {
                 Pdata_clear(self->stack, i + 1);
                 Py_SIZE(self->stack) = x;
+                Py_DECREF(append_func);
                 return -1;
             }
             Py_DECREF(result);
         }
         Py_SIZE(self->stack) = x;
+        Py_DECREF(append_func);
     }
 
     return 0;