if (self->priv->info->icon)
g_key_file_set_string(key, "User", "Icon", self->priv->info->icon);
- if (!_get_userinfo_path(self, path, sizeof(path)))
+ if (!_get_userinfo_path(self, path, sizeof(path))) {
+ g_key_file_free(key);
return FALSE;
-
+ }
if (!g_key_file_save_to_file(key, path, &error)) {
WARN("Key file save failure error %d:%s", error ? error->code : 0,
error ? error->message : "");
if (!key)
return FALSE;
- if (!_get_userinfo_path(self, path, sizeof(path)))
+ if (!_get_userinfo_path(self, path, sizeof(path))) {
+ g_key_file_free(key);
return FALSE;
+ }
g_key_file_load_from_file(key, path, G_KEY_FILE_NONE, NULL);
if (!key)
return FALSE;
- if (!_get_userinfo_path(self, path, sizeof(path)))
+ if (!_get_userinfo_path(self, path, sizeof(path))) {
+ g_key_file_free(key);
return FALSE;
+ }
if (!g_key_file_load_from_file(key, path, G_KEY_FILE_NONE, &error)) {
g_key_file_free(key);
gpointer user_data)
{
GumGroup *group = GUM_GROUP (g_object_new (GUM_TYPE_GROUP, NULL));
- g_return_val_if_fail (group->priv->dbus_service != NULL, NULL);
+
+ if (!group) return NULL;
+
+ if (!group->priv->dbus_service) {
+ g_object_unref(group);
+ return NULL;
+ }
_create_op (group, callback, user_data);
gum_dbus_group_service_call_create_new_group (group->priv->dbus_service,
return group;
}
- g_return_val_if_fail (group->priv->dbus_service != NULL, NULL);
+ if (!group->priv->dbus_service) {
+ g_object_unref(group);
+ return NULL;
+ }
if (gum_dbus_group_service_call_create_new_group_sync (
group->priv->dbus_service, &object_path, group->priv->cancellable,
gpointer user_data)
{
GumGroup *group = GUM_GROUP (g_object_new (GUM_TYPE_GROUP, NULL));
- g_return_val_if_fail (group->priv->dbus_service != NULL, NULL);
+
+ if (!group) return NULL;
+
+ if (!group->priv->dbus_service) {
+ g_object_unref(group);
+ return NULL;
+ }
_create_op (group, callback, user_data);
gum_dbus_group_service_call_get_group (group->priv->dbus_service, gid,
gpointer user_data)
{
GumGroup *group = GUM_GROUP (g_object_new (GUM_TYPE_GROUP, NULL));
- g_return_val_if_fail (group->priv->dbus_service != NULL, NULL);
+
+ if (!group) return NULL;
+
+ if (!group->priv->dbus_service) {
+ g_object_unref(group);
+ return NULL;
+ }
if (!groupname) {
WARN ("groupname not specified");
GumUser *user = GUM_USER (g_object_new (GUM_TYPE_USER, "offline", FALSE,
NULL));
- g_return_val_if_fail (user && user->priv->dbus_service != NULL, NULL);
+ if (!user) return NULL;
+
+ if (!user->priv->dbus_service) {
+ g_object_unref(user);
+ return NULL;
+ }
_create_op (user, callback, user_data);
gum_dbus_user_service_call_create_new_user (
(GumDbusUserService*) gum_user_service_get_dbus_proxy (
return user;
}
- g_return_val_if_fail (user->priv->dbus_service != NULL, NULL);
+ if (!user->priv->dbus_service) {
+ g_object_unref(user);
+ return NULL;
+ }
if (gum_dbus_user_service_call_create_new_user_sync (
(GumDbusUserService*) gum_user_service_get_dbus_proxy (
GumUser *user = GUM_USER (g_object_new (GUM_TYPE_USER, "offline", FALSE,
NULL));
- g_return_val_if_fail (user && user->priv->dbus_service != NULL, NULL);
+ if (!user) return NULL;
+
+ if (!user->priv->dbus_service) {
+ g_object_unref(user);
+ return NULL;
+ }
_create_op (user, callback, user_data);
gum_dbus_user_service_call_get_user (
user = GUM_USER (g_object_new (GUM_TYPE_USER, "offline", FALSE, NULL));
- g_return_val_if_fail (user && user->priv->dbus_service != NULL, NULL);
+ if (!user) return NULL;
+
+ if (!user->priv->dbus_service) {
+ g_object_unref(user);
+ return NULL;
+ }
_create_op (user, callback, user_data);
gum_dbus_user_service_call_get_user_by_name (