]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_python: Fix the wide_path changes made in 1eb569dcb4 (#2998)
authorJorge Pereira <jpereira@users.noreply.github.com>
Tue, 17 Sep 2019 20:49:13 +0000 (17:49 -0300)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Sep 2019 20:49:13 +0000 (15:49 -0500)
src/modules/rlm_python/rlm_python.c

index 72d39648f0a22a74a2ddc5d42225e0da83879036..5f0e7e771296c952910b11746c30d61d243e3e3b 100644 (file)
@@ -63,12 +63,6 @@ typedef struct {
                                                        ///< rlm_python module config in the python path.
        bool            python_path_include_default;    //!< Include the default python path
                                                        ///< in the python path.
-
-#if PY_MAJOR_VERSION == 3
-       wchar_t         *wide_path;             //!< Special wide char encoding of radiusd path.
-                                               //!< FreeRADIUS functions.
-#endif
-
        PyObject        *module;                //!< Local, interpreter specific module.
 
 #if PY_MAJOR_VERSION == 2
@@ -961,8 +955,8 @@ static int python_interpreter_init(rlm_python_t *inst, CONF_SECTION *conf)
        DEBUG3("Setting python path to \"%s\"", path);
        wide_path = Py_DecodeLocale(path, NULL);
        talloc_free(path);
-       PySys_SetPath(inst->wide_path);
-       PyMem_RawFree(inst->wide_path);
+       PySys_SetPath(wide_path);
+       PyMem_RawFree(wide_path);
 
        /*
         *      Import the radiusd module into this python