mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
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:
parent
47cd3d9298
commit
266df90f5e
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user