Skip to content

Commit

Permalink
initialize local variables. May help with #5111
Browse files Browse the repository at this point in the history
main_interprerter is checked, but there are code paths by which
the variable is used without being initialized.
  • Loading branch information
alandekok committed Aug 25, 2023
1 parent feeb31e commit 6dc5a84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/rlm_python3/rlm_python3.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ RCSID("$Id$")
static uint32_t python_instances = 0;
static void *python_dlhandle;

static PyThreadState *main_interpreter; //!< Main interpreter (cext safe)
static PyObject *main_module; //!< Pthon configuration dictionary.
static PyThreadState *main_interpreter = NULL; //!< Main interpreter (cext safe)
static PyObject *main_module = NULL; //!< Pthon configuration dictionary.

static rlm_python_t *current_inst; //!< Needed to pass parameter to PyInit_radiusd
static CONF_SECTION *current_conf; //!< Needed to pass parameter to PyInit_radiusd
static rlm_python_t *current_inst = NULL; //!< Needed to pass parameter to PyInit_radiusd
static CONF_SECTION *current_conf = NULL; //!< Needed to pass parameter to PyInit_radiusd

/*
* A mapping of configuration file names to internal variables.
Expand Down

0 comments on commit 6dc5a84

Please sign in to comment.