}
static void
+polkit_unix_session_finalize (GObject *object)
+{
+ PolkitUnixSession *session = POLKIT_UNIX_SESSION (object);
+
+ g_free (session->session_id);
+
+ if (G_OBJECT_CLASS (polkit_unix_session_parent_class)->finalize != NULL)
+ G_OBJECT_CLASS (polkit_unix_session_parent_class)->finalize (object);
+}
+
+static void
polkit_unix_session_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
PolkitUnixSession *session = POLKIT_UNIX_SESSION (object);
static void
polkit_unix_session_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
PolkitUnixSession *session = POLKIT_UNIX_SESSION (object);
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = polkit_unix_session_finalize;
gobject_class->get_property = polkit_unix_session_get_property;
gobject_class->set_property = polkit_unix_session_set_property;
PolkitActionDescription *ret;
_PolkitActionDescription *real;
ParsedAction *parsed_action;
- gchar *description;
- gchar *message;
+ const gchar *description;
+ const gchar *message;
g_return_val_if_fail (POLKIT_BACKEND_IS_ACTION_POOL (pool), NULL);
goto out;
}
- description = g_strdup (_localize (parsed_action->localized_description,
- parsed_action->description,
- locale));
- message = g_strdup (_localize (parsed_action->localized_message,
- parsed_action->message,
- locale));
+ description = _localize (parsed_action->localized_description,
+ parsed_action->description,
+ locale);
+ message = _localize (parsed_action->localized_message,
+ parsed_action->message,
+ locale);
real = _polkit_action_description_new (action_id,
description,
_PolkitAuthorizationResult *real_result;
real_result = polkit_authorization_result_get_real (result);
_polkit_authority_handle_check_authorization_finish (method_invocation, real_result);
+ g_object_unref (real_result);
g_object_unref (result);
}
}