mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
util: use g_auto in virNodeSuspendHelper
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
00a565aa78
commit
6698d8f530
@ -102,7 +102,7 @@ static int virNodeSuspendSetNodeWakeup(unsigned long long alarmTime)
|
|||||||
*/
|
*/
|
||||||
static void virNodeSuspendHelper(void *cmdString)
|
static void virNodeSuspendHelper(void *cmdString)
|
||||||
{
|
{
|
||||||
virCommand *suspendCmd = virCommandNew((const char *)cmdString);
|
g_autoptr(virCommand) suspendCmd = virCommandNew((const char *)cmdString);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delay for sometime so that the function virNodeSuspend()
|
* Delay for sometime so that the function virNodeSuspend()
|
||||||
@ -112,8 +112,6 @@ static void virNodeSuspendHelper(void *cmdString)
|
|||||||
if (virCommandRun(suspendCmd, NULL) < 0)
|
if (virCommandRun(suspendCmd, NULL) < 0)
|
||||||
VIR_WARN("Failed to suspend the host");
|
VIR_WARN("Failed to suspend the host");
|
||||||
|
|
||||||
virCommandFree(suspendCmd);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that we have resumed from suspend or the suspend failed,
|
* Now that we have resumed from suspend or the suspend failed,
|
||||||
* reset 'aboutToSuspend' flag.
|
* reset 'aboutToSuspend' flag.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user