mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +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)
|
const char *resname)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
char *respath = NULL;
|
g_autofree char *respath = NULL;
|
||||||
|
|
||||||
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
||||||
|
|
||||||
@ -538,7 +538,6 @@ int virLockSpaceCreateResource(virLockSpacePtr lockspace,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virMutexUnlock(&lockspace->lock);
|
virMutexUnlock(&lockspace->lock);
|
||||||
VIR_FREE(respath);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -547,7 +546,7 @@ int virLockSpaceDeleteResource(virLockSpacePtr lockspace,
|
|||||||
const char *resname)
|
const char *resname)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
char *respath = NULL;
|
g_autofree char *respath = NULL;
|
||||||
|
|
||||||
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
|
||||||
|
|
||||||
@ -575,7 +574,6 @@ int virLockSpaceDeleteResource(virLockSpacePtr lockspace,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virMutexUnlock(&lockspace->lock);
|
virMutexUnlock(&lockspace->lock);
|
||||||
VIR_FREE(respath);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user