File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -1273,25 +1273,36 @@ PyInit_faulthandler(void)
12731273#ifdef MS_WINDOWS
12741274 /* RaiseException() codes (prefixed by an underscore) */
12751275 if (PyModule_AddIntConstant (m , "_EXCEPTION_ACCESS_VIOLATION" ,
1276- EXCEPTION_ACCESS_VIOLATION ))
1277- return NULL ;
1276+ EXCEPTION_ACCESS_VIOLATION )) {
1277+ goto error ;
1278+ }
12781279 if (PyModule_AddIntConstant (m , "_EXCEPTION_INT_DIVIDE_BY_ZERO" ,
1279- EXCEPTION_INT_DIVIDE_BY_ZERO ))
1280- return NULL ;
1280+ EXCEPTION_INT_DIVIDE_BY_ZERO )) {
1281+ goto error ;
1282+ }
12811283 if (PyModule_AddIntConstant (m , "_EXCEPTION_STACK_OVERFLOW" ,
1282- EXCEPTION_STACK_OVERFLOW ))
1283- return NULL ;
1284+ EXCEPTION_STACK_OVERFLOW )) {
1285+ goto error ;
1286+ }
12841287
12851288 /* RaiseException() flags (prefixed by an underscore) */
12861289 if (PyModule_AddIntConstant (m , "_EXCEPTION_NONCONTINUABLE" ,
1287- EXCEPTION_NONCONTINUABLE ))
1288- return NULL ;
1290+ EXCEPTION_NONCONTINUABLE )) {
1291+ goto error ;
1292+ }
12891293 if (PyModule_AddIntConstant (m , "_EXCEPTION_NONCONTINUABLE_EXCEPTION" ,
1290- EXCEPTION_NONCONTINUABLE_EXCEPTION ))
1291- return NULL ;
1294+ EXCEPTION_NONCONTINUABLE_EXCEPTION )) {
1295+ goto error ;
1296+ }
12921297#endif
12931298
12941299 return m ;
1300+
1301+ #ifdef MS_WINDOWS
1302+ error :
1303+ Py_DECREF (m );
1304+ return NULL ;
1305+ #endif
12951306}
12961307
12971308static int
You can’t perform that action at this time.
0 commit comments