[PATCH] driver.c: Use g_autofree

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

 



This is the only instance of g_autofree change applicable for
driver.c

Signed-off-by: Seeteena Thoufeek <s1seetee@xxxxxxxxxxxxxxxxxx>
---
 src/driver.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/driver.c b/src/driver.c
index a2047be..e745210 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -48,7 +48,7 @@ virDriverLoadModule(const char *name,
                     const char *regfunc,
                     bool required)
 {
-    char *modfile = NULL;
+    g_autofree char *modfile = NULL;
     int ret;
 
     VIR_DEBUG("Module load %s", name);
@@ -62,9 +62,6 @@ virDriverLoadModule(const char *name,
         return -1;
 
     ret = virModuleLoad(modfile, regfunc, required);
-
-    VIR_FREE(modfile);
-
     return ret;
 }
 
-- 
1.8.3.1






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux