summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-03-07 21:17:40 +0300
committermonsta <[email protected]>2017-03-07 21:17:40 +0300
commitaf42e80e56a7ca9a0843457dae28e9d78121b6b9 (patch)
tree62ece0958a76abdc7deeb7978544b52de7ad1e2b /src
parent055703fe26a07abec86aba09f9a51d0b2dc5bac4 (diff)
downloadmate-power-manager-af42e80e56a7ca9a0843457dae28e9d78121b6b9.tar.bz2
mate-power-manager-af42e80e56a7ca9a0843457dae28e9d78121b6b9.tar.xz
use proper return type and fix a small memleak
Diffstat (limited to 'src')
-rw-r--r--src/gpm-control.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpm-control.c b/src/gpm-control.c
index 9a1273b..d394d93 100644
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@ -273,7 +273,8 @@ gpm_control_suspend (GpmControl *control, GError **error)
if (proxy == NULL) {
egg_error("Error connecting to dbus - %s", dbus_error->message);
g_error_free (dbus_error);
- return -1;
+ ret = FALSE;
+ goto out;
}
res = g_dbus_proxy_call_sync (proxy, "Suspend",
g_variant_new( "(b)",FALSE),
@@ -387,7 +388,8 @@ gpm_control_hibernate (GpmControl *control, GError **error)
if (proxy == NULL) {
egg_error("Error connecting to dbus - %s", dbus_error->message);
g_error_free (dbus_error);
- return -1;
+ ret = FALSE;
+ goto out;
}
res = g_dbus_proxy_call_sync (proxy, "Hibernate",
g_variant_new( "(b)",FALSE),