From 1356f785c1fd8c2282f812b4ec6365359cb5b84f Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 15 Apr 2005 15:58:42 +0000 Subject: [PATCH] SF bug #1183742: PyDict_Copy() can return non-NULL value on error --- Objects/dictobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 82e82a8bc9..1be34774e3 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1291,7 +1291,7 @@ PyDict_Copy(PyObject *o) if (PyDict_Merge(copy, o, 1) == 0) return copy; Py_DECREF(copy); - return copy; + return NULL; } int -- 2.40.0