Skip to content

Commit

Permalink
Minor bug solved in py loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Feb 20, 2024
1 parent cc0d7f9 commit fabec99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/loaders/py_loader/source/py_loader_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3153,6 +3153,7 @@ loader_handle py_loader_impl_load_from_file(loader_impl impl, const loader_path
loader_impl_py_handle py_handle = py_loader_impl_handle_create(size);
int run_main = 1;
size_t iterator;
PyObject *exception = NULL;

if (py_handle == NULL)
{
Expand Down Expand Up @@ -3180,7 +3181,6 @@ loader_handle py_loader_impl_load_from_file(loader_impl impl, const loader_path
for (iterator = 0; iterator < size; ++iterator)
{
int result = 1;
PyObject *exception = NULL;

/* We assume it is a path so we load from path */
if (portability_path_is_absolute(paths[iterator], strnlen(paths[iterator], LOADER_PATH_SIZE) + 1) == 0)
Expand Down Expand Up @@ -3253,6 +3253,7 @@ loader_handle py_loader_impl_load_from_file(loader_impl impl, const loader_path
py_loader_impl_error_print(py_impl);
PyErr_Clear();
}
Py_XDECREF(exception);
error_recursive_call:
PyGILState_Release(gstate);
PyEval_RestoreThread(tstate);
Expand Down

0 comments on commit fabec99

Please sign in to comment.