[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V3 01/13] 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@xxxxxxxxxx> --- tools/libxl/libxl_cpuid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index dd21b78..8a59c4d 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -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; } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |