util: storagefilebackend: convert pointers to use g_autofree

Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Barrett Schonefeld 2020-11-23 16:09:27 -06:00 committed by Ján Tomko
parent 47cd3d9298
commit 266df90f5e

View File

@ -51,7 +51,7 @@ virStorageFileLoadBackendModule(const char *name,
const char *regfunc, const char *regfunc,
bool forceload) bool forceload)
{ {
char *modfile = NULL; g_autofree char *modfile = NULL;
int ret; int ret;
if (!(modfile = virFileFindResourceFull(name, if (!(modfile = virFileFindResourceFull(name,
@ -64,8 +64,6 @@ virStorageFileLoadBackendModule(const char *name,
ret = virModuleLoad(modfile, regfunc, forceload); ret = virModuleLoad(modfile, regfunc, forceload);
VIR_FREE(modfile);
return ret; return ret;
} }
#endif /* WITH_STORAGE_DIR || WITH_STORAGE_FS || WITH_STORAGE_GLUSTER */ #endif /* WITH_STORAGE_DIR || WITH_STORAGE_FS || WITH_STORAGE_GLUSTER */