Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/pam_python.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,7 @@ static int load_user_module(
PyObject* module_dict = 0;
FILE* module_fp = 0;
char* user_module_name = 0;
const char* tmp_const_user_module_name = 0;
PyObject* py_resultobj = 0;
char* dot;
int pam_result;
Expand All @@ -2300,11 +2301,11 @@ static int load_user_module(
/*
* Create the new module.
*/
user_module_name = strrchr(module_path, '/');
if (user_module_name == 0)
tmp_const_user_module_name = strrchr(module_path, '/');
if (tmp_const_user_module_name == 0)
user_module_name = strdup(module_path);
else
user_module_name = strdup(user_module_name + 1);
user_module_name = strdup(tmp_const_user_module_name + 1);
if (user_module_name == 0)
{
syslog_path_message(MODULE_NAME, "out of memory");
Expand Down