From: Wei Liu Date: Tue, 14 Jul 2015 16:41:07 +0000 (+0100) Subject: libxl: avoid leaking in libxl__initiate_device_remove X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2823 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=974e208b404a8a4f1df006082030f4d3bf884c1e;p=xen.git libxl: avoid leaking in libxl__initiate_device_remove Change "return" to "goto out_success" to correctly dispose of the structure. Signed-off-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 2493972424..bee5ed564b 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -816,7 +816,7 @@ void libxl__initiate_device_remove(libxl__egc *egc, be_path); goto out; } - return; + goto out_success; } } @@ -868,6 +868,7 @@ void libxl__initiate_device_remove(libxl__egc *egc, goto out; } +out_success: libxl_dominfo_dispose(&info); return;