session: Don't close a null dir in read_environment_dir

Closes: #1615 [via git-merge-pr]
This commit is contained in:
Scarcely There 2024-03-13 00:22:49 -05:00 committed by Andrew J. Hesford
parent 3460d5be98
commit bfa3a32ae3

View file

@ -140,8 +140,9 @@ read_environment_dir(const char *path_prefix)
free(env_file_path);
}
env_dir_cleanup:
closedir(envdir);
env_dir_cleanup:
free(path);
return success;
}