From: Barrett Schonefeld <bschoney@xxxxxxxxxx> - src/util/virstoragefilebackend.c Signed-off-by: Barrett Schonefeld <bschoney@xxxxxxxxxx> --- src/util/virstoragefilebackend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/virstoragefilebackend.c b/src/util/virstoragefilebackend.c index 2779b5c307..55c62b0212 100644 --- a/src/util/virstoragefilebackend.c +++ b/src/util/virstoragefilebackend.c @@ -51,7 +51,7 @@ virStorageFileLoadBackendModule(const char *name, const char *regfunc, bool forceload) { - char *modfile = NULL; + g_autofree char *modfile = NULL; int ret; if (!(modfile = virFileFindResourceFull(name, @@ -64,8 +64,6 @@ virStorageFileLoadBackendModule(const char *name, ret = virModuleLoad(modfile, regfunc, forceload); - VIR_FREE(modfile); - return ret; } #endif /* WITH_STORAGE_DIR || WITH_STORAGE_FS || WITH_STORAGE_GLUSTER */ -- 2.29.0