dl dlopen: ensure dirs is not NULL
opal_argv_split() may have returned NULL. This was Coverity CID 1288088
Этот коммит содержится в:
родитель
86968dcdda
Коммит
3efb5f56ae
@ -162,7 +162,7 @@ static int dlopen_foreachfile(const char *search_path,
|
||||
char **good_files = NULL;
|
||||
|
||||
dirs = opal_argv_split(search_path, OPAL_ENV_SEP);
|
||||
for (int i = 0; NULL != dirs[i]; ++i) {
|
||||
for (int i = 0; NULL != dirs && NULL != dirs[i]; ++i) {
|
||||
|
||||
dp = opendir(dirs[i]);
|
||||
if (NULL == dp) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user