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

[libvirt] [PATCH 07/11] uml: If need to requery, then VIR_FREE(res)



Coverity noted that in the retry logic loop if res had been set, then
it could be leaked
---
 src/uml/uml_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 705495e..d97cc96 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1,7 +1,7 @@
 /*
  * uml_driver.c: core driver methods for managing UML guests
  *
- * Copyright (C) 2006-2012 Red Hat, Inc.
+ * Copyright (C) 2006-2013 Red Hat, Inc.
  * Copyright (C) 2006-2008 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -263,6 +263,7 @@ requery:
            way somehow ...perhaps register a timer */
         if (retries++ < 50) {
             usleep(1000*10);
+            VIR_FREE(res);
             goto requery;
         }
     }
-- 
1.7.11.7


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