[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging-4.10] libxl: correctly dispose of dominfo list in libxl_name_to_domid



commit e21c79fe4fd204eca0c6b9f79102e3826db7334a
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Tue Jan 29 11:37:59 2019 +0000
Commit:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CommitDate: Tue Feb 5 11:57:43 2019 +0000

    libxl: correctly dispose of dominfo list in libxl_name_to_domid
    
    Tamas reported ssid_label was leaked. Use the designated function to
    free dominfo list to fix the leakage.
    
    Reported-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Tested-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
    (cherry picked from commit f50dd67950ca9d5a517501af10de7c8d88d1a188)
    (cherry picked from commit 87f51bf366ca79b98e1e201bf9bd7a9c164631e2)
---
 tools/libxl/libxl_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
index 507ee56c7c..85aac47a63 100644
--- a/tools/libxl/libxl_utils.c
+++ b/tools/libxl/libxl_utils.c
@@ -90,7 +90,7 @@ int libxl_name_to_domid(libxl_ctx *ctx, const char *name,
         }
         free(domname);
     }
-    free(dominfo);
+    libxl_dominfo_list_free(dominfo, nb_domains);
     return ret;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.