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

[Xen-devel] [PATCH 04/13] libxl: don't leak p in libxl__wait_for_backend



Coverity-ID: 1055891
Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx>
---
 tools/libxl/libxl_device.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index d995c83..072b5e3 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -1219,6 +1219,7 @@ int libxl__wait_for_backend(libxl__gc *gc, char *be_path, 
char *state)
             goto out;
         } else {
             if (!strcmp(p, state)) {
+                free(p);
                 rc = 0;
                 goto out;
             } else {
@@ -1226,6 +1227,8 @@ int libxl__wait_for_backend(libxl__gc *gc, char *be_path, 
char *state)
                 watchdog--;
             }
         }
+
+        free(p);
     }
     LOG(ERROR, "Backend %s not ready", be_path);
 out:
-- 
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®.