Message ID | 20231106123518.588528-4-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [CI,1/9] tests/i915/drm_fdinfo: Check engine info is supported | expand |
diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c index b72822894782..222ccbfb1fd6 100644 --- a/lib/igt_drm_fdinfo.c +++ b/lib/igt_drm_fdinfo.c @@ -148,6 +148,10 @@ static int parse_region(char *line, struct drm_client_fdinfo *info, for (i = 0; i < region_entries; i++) { if (!strncmp(name, region_map[i], name_len)) { found = i; + if (!info->region_names[info->num_regions][0]) { + assert(name_len < sizeof(info->region_names[i])); + strncpy(info->region_names[i], name, name_len); + } break; } }