Skip to content

Commit

Permalink
If rlm_python instantiation fails, free the interpreter
Browse files Browse the repository at this point in the history
Without this, Py_Finalize() crashes
  • Loading branch information
ndptech committed Dec 4, 2024
1 parent 6323add commit 771a009
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/rlm_python/rlm_python.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
case RLM_MODULE_REJECT:
error:
fr_cond_assert(PyEval_SaveThread() == inst->interpreter);
python_interpreter_free(inst, inst->interpreter);
return -1;

default:
Expand Down

0 comments on commit 771a009

Please sign in to comment.