gh-125234: Make PyInitConfig_Free(NULL) a no-op (#125266)

This commit is contained in:
RUANG (Roy James) 2024-10-15 17:21:16 +08:00 committed by GitHub
parent 92af191a6a
commit 546dddca43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View file

@ -3457,6 +3457,9 @@ PyInitConfig_Create(void)
void
PyInitConfig_Free(PyInitConfig *config)
{
if (config == NULL) {
return;
}
free(config->err_msg);
free(config);
}