SF bug #1183742: PyDict_Copy() can return non-NULL value on error
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 82e82a8..1be3477 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1291,7 +1291,7 @@
 	if (PyDict_Merge(copy, o, 1) == 0)
 		return copy;
 	Py_DECREF(copy);
-	return copy;
+	return NULL;
 }
 
 int