File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1621,6 +1621,8 @@ Create Config
16211621
16221622 Free memory of the initialization configuration *config *.
16231623
1624+ If *config * is ``NULL ``, no operation is performed.
1625+
16241626
16251627Error Handling
16261628--------------
Original file line number Diff line number Diff line change @@ -1896,6 +1896,7 @@ static int test_initconfig_api(void)
18961896 goto error ;
18971897 }
18981898 PyInitConfig_Free (config );
1899+ PyInitConfig_Free (NULL );
18991900
19001901 dump_config ();
19011902 Py_Finalize ();
Original file line number Diff line number Diff line change @@ -3457,6 +3457,9 @@ PyInitConfig_Create(void)
34573457void
34583458PyInitConfig_Free (PyInitConfig * config )
34593459{
3460+ if (config == NULL ) {
3461+ return ;
3462+ }
34603463 free (config -> err_msg );
34613464 free (config );
34623465}
You can’t perform that action at this time.
0 commit comments