summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-30 17:21:07 +0100
committerGitHub <noreply@github.com>2017-11-30 17:21:07 +0100
commit0efc0249ca1fd0675098957407fbba2c0f6949ce (patch)
tree8b7ed7b31def95c1bba20de71daefe66aeab2941 /Python/pylifecycle.c
parent86afc1f2a7fb3afe00779c6426bc141bc795d9a3 (diff)
downloadcpython-git-0efc0249ca1fd0675098957407fbba2c0f6949ce.tar.gz
Fix CID-1414686: PyInit_readline() handles errors (#4647)
Handle PyModule_AddIntConstant() and PyModule_AddStringConstant() failures. Add also constants before calling setup_readline(), since setup_readline() registers callbacks which uses a reference to the module, whereas the module is destroyed if adding constants fails. Fix Coverity warning: CID 1414686: Unchecked return value (CHECKED_RETURN) 2. check_return: Calling PyModule_AddStringConstant without checking return value (as is done elsewhere 45 out of 55 times).
Diffstat (limited to 'Python/pylifecycle.c')
0 files changed, 0 insertions, 0 deletions