diff options
author | monsta <[email protected]> | 2017-03-07 21:17:40 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-03-07 21:17:40 +0300 |
commit | af42e80e56a7ca9a0843457dae28e9d78121b6b9 (patch) | |
tree | 62ece0958a76abdc7deeb7978544b52de7ad1e2b /src/gpm-control.c | |
parent | 055703fe26a07abec86aba09f9a51d0b2dc5bac4 (diff) | |
download | mate-power-manager-af42e80e56a7ca9a0843457dae28e9d78121b6b9.tar.bz2 mate-power-manager-af42e80e56a7ca9a0843457dae28e9d78121b6b9.tar.xz |
use proper return type and fix a small memleak
Diffstat (limited to 'src/gpm-control.c')
-rw-r--r-- | src/gpm-control.c | 6 |
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), |