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

[Xen-devel] [PATCH 14/28] libxl: only free console reader if it was allocated in main_dmesg



Coverity-ID: 1055304
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 81ec66c..642b130 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -5537,7 +5537,8 @@ int main_dmesg(int argc, char **argv)
         printf("%s", line);
 
 finish:
-    libxl_xen_console_read_finish(ctx, cr);
+    if (cr)
+        libxl_xen_console_read_finish(ctx, cr);
     return ret;
 }
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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