Skip to content

Commit bbeb223

Browse files
authored
bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387)
Fix warning: Objects\exceptions.c(2324,56): warning C4098: 'MemoryError_dealloc': 'void' function returning a value
1 parent 98c16c9 commit bbeb223

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/exceptions.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,8 @@ MemoryError_dealloc(PyBaseExceptionObject *self)
23212321
/* If this is a subclass of MemoryError, we don't need to
23222322
* do anything in the free-list*/
23232323
if (!Py_IS_TYPE(self, (PyTypeObject *) PyExc_MemoryError)) {
2324-
return Py_TYPE(self)->tp_free((PyObject *)self);
2324+
Py_TYPE(self)->tp_free((PyObject *)self);
2325+
return;
23252326
}
23262327

23272328
_PyObject_GC_UNTRACK(self);

0 commit comments

Comments
 (0)