[xen stable-4.11] libxl: correctly dispose of dominfo list in libxl_name_to_domid

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.11] libxl: correctly dispose of dominfo list in libxl_name_to_domid

patchbot
commit 87f51bf366ca79b98e1e201bf9bd7a9c164631e2
Author:     Wei Liu <[hidden email]>
AuthorDate: Tue Jan 29 11:37:59 2019 +0000
Commit:     Ian Jackson <[hidden email]>
CommitDate: Tue Feb 5 11:57:32 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 <[hidden email]>
    Signed-off-by: Wei Liu <[hidden email]>
    Tested-by: Tamas K Lengyel <[hidden email]>
    Acked-by: Ian Jackson <[hidden email]>
    Release-acked-by: Juergen Gross <[hidden email]>
    (cherry picked from commit f50dd67950ca9d5a517501af10de7c8d88d1a188)
---
 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#stable-4.11

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog