mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: lockspace: 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
8e9598dcad
commit
a93413c4d5
@ -515,7 +515,7 @@ int virLockSpaceCreateResource(virLockSpacePtr lockspace,
|
||||
const char *resname)
|
||||
{
|
||||
int ret = -1;
|
||||
char *respath = NULL;
|
||||
g_autofree char *respath = NULL;
|
||||
|
||||
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
||||
|
||||
@ -538,7 +538,6 @@ int virLockSpaceCreateResource(virLockSpacePtr lockspace,
|
||||
|
||||
cleanup:
|
||||
virMutexUnlock(&lockspace->lock);
|
||||
VIR_FREE(respath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -547,7 +546,7 @@ int virLockSpaceDeleteResource(virLockSpacePtr lockspace,
|
||||
const char *resname)
|
||||
{
|
||||
int ret = -1;
|
||||
char *respath = NULL;
|
||||
g_autofree char *respath = NULL;
|
||||
|
||||
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
||||
|
||||
@ -575,7 +574,6 @@ int virLockSpaceDeleteResource(virLockSpacePtr lockspace,
|
||||
|
||||
cleanup:
|
||||
virMutexUnlock(&lockspace->lock);
|
||||
VIR_FREE(respath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user