mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
libxl: fix memory leak in libxl_cpuid_dispose
libxl_cpuid_policy_list is not allocated with GC-aware allocation so it needs to be freed manually, just like what libxl_string_list_dispose and libxl_key_value_list_dispose do. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
cf37a923ea
commit
e620f2dfa5
1 file changed
+1
@@ -26,6 +26,7 @@ void libxl_cpuid_dispose(libxl_cpuid_policy_list *p_cpuid_list)
|
||||
if (cpuid_list[i].policy[j] != NULL)
|
||||
free(cpuid_list[i].policy[j]);
|
||||
}
|
||||
free(cpuid_list);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||