[PATCH] driver.c: Use g_autofree

This is the only instance of g_autofree change applicable for driver.c Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com> --- 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

On Mon, Apr 13, 2020 at 06:18:57PM +0530, Seeteena Thoufeek wrote:
This is the only instance of g_autofree change applicable for driver.c
I'd say something like: "This is the last missing g_autofree change to convert the module after commit 1e2ae2e311c took care of the VIR_AUTOFREE conversion". Reviewed-by: Erik Skultety <eskultet@redhat.com> I'll merge this with the adjusted commit message.
participants (2)
-
Erik Skultety
-
Seeteena Thoufeek