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]
Dieser Commit ist enthalten in:
Sean Keely
2019-08-27 00:37:05 -05:00
Ursprung 98604d9885
Commit 1ce4bebec2
+1 -1
Datei anzeigen
@@ -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;