mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 07:38:17 +02:00
Fix two issues with the pm-powersave code
Signed-off-by: Richard Hughes <richard@hughsie.com>
This commit is contained in:
parent
e66bc06cfd
commit
e808a5063b
1 changed files with 4 additions and 2 deletions
|
|
@ -457,7 +457,7 @@ dkp_daemon_set_pmutils_powersave (DkpDaemon *daemon, gboolean powersave)
|
|||
{
|
||||
gboolean ret;
|
||||
gchar *command;
|
||||
GError *error;
|
||||
GError *error = NULL;
|
||||
|
||||
/* run script from pm-utils */
|
||||
command = g_strdup_printf ("pm-powersave %s", powersave ? "true" : "false");
|
||||
|
|
@ -466,8 +466,10 @@ dkp_daemon_set_pmutils_powersave (DkpDaemon *daemon, gboolean powersave)
|
|||
if (!ret) {
|
||||
egg_warning ("failed to run script: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
g_free (command);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue