Change "return" to "goto out_success" to correctly dispose of the structure.
Signed-off-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 2493972..bee5ed5 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; -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel