summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2024-07-04 01:42:13 -0700
committerJordan Justen <jordan.l.justen@intel.com>2024-07-05 00:25:03 -0700
commitd57c575e870a7f56ecf2ece2644a7c2b10c79830 (patch)
tree07eabfa503a139c352c80c2553f539864e30b802
parent9a3172e489d83527f6da624bd4343681bf497b51 (diff)
intel/perf/xe: Fix free pointer location in xe_add_config()xe-perf-free-fix
Fixes: 6258c843752 ("intel/perf: Refactor and add Xe KMD support to add and remove configs") Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
-rw-r--r--src/intel/perf/xe/intel_perf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/perf/xe/intel_perf.c b/src/intel/perf/xe/intel_perf.c
index 6bd0f84149c..dfbe2881413 100644
--- a/src/intel/perf/xe/intel_perf.c
+++ b/src/intel/perf/xe/intel_perf.c
@@ -103,7 +103,7 @@ xe_add_config(struct intel_perf_config *perf, int fd,
memcpy(regs, config->flex_regs, config->n_flex_regs * sizeof(uint64_t));
ret = intel_ioctl(fd, DRM_IOCTL_XE_PERF, &perf_param);
- free(regs);
+ free((void*)(uintptr_t)xe_config.regs_ptr);
return ret > 0 ? ret : 0;
}