Initialize dirp in topology_create_temp_cpu_cache_list to NULL.
Avoids uninitialized use in early exit (error) paths.
Change-Id: I5fb24863f0a5da48776608d47f25e1c8d8aafe35
[ROCm/ROCR-Runtime commit: 8ab8b14902]
Этот коммит содержится в:
1 родитель
98604d9885
Коммит
1ce4bebec2
1 file changed
+1
-1
@@ -1166,7 +1166,7 @@ static int topology_create_temp_cpu_cache_list(int node,
|
||||
int max_cpus;
|
||||
cpu_cacheinfo_t *this_cpu; /* one cpu_ci in cpu_ci_list */
|
||||
int cache_cnt = 0;
|
||||
DIR *dirp;
|
||||
DIR *dirp = NULL;
|
||||
struct dirent *dir;
|
||||
char *p;
|
||||
|
||||
|
||||
Reference in new issue
Block a user