/soc/2013/ankitkv/gobjectification: 416a7736a401: Unref and free...
Ankit Vani
a at nevitus.org
Fri Sep 6 07:12:07 EDT 2013
Changeset: 416a7736a4018b8d3fe861ebb457acea90e5830b
Author: Ankit Vani <a at nevitus.org>
Date: 2013-09-06 16:10 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/416a7736a401
Description:
Unref and free everything recieved from g_object_get
diffstat:
libpurple/connection.c | 1 +
libpurple/conversation.c | 2 ++
libpurple/conversationtypes.c | 3 +++
libpurple/media.c | 4 ++--
pidgin/gtkdialogs.c | 2 ++
5 files changed, 10 insertions(+), 2 deletions(-)
diffs (69 lines):
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -702,6 +702,7 @@ purple_connection_constructed(GObject *o
g_object_get(gc, PROP_ACCOUNT_S, &account, NULL);
purple_account_set_connection(account, gc);
+ g_object_unref(account);
purple_signal_emit(purple_connections_get_handle(), "signing-on", gc);
}
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -1024,6 +1024,8 @@ purple_conversation_constructed(GObject
purple_signal_emit(purple_conversations_get_handle(),
"conversation-created", conv);
+
+ g_object_unref(account);
}
/* GObject dispose function */
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -445,6 +445,7 @@ purple_im_conversation_constructed(GObje
if (purple_prefs_get_bool("/purple/logging/log_ims"))
purple_conversation_set_logging(PURPLE_CONVERSATION(im), TRUE);
+ g_object_unref(account);
g_free(name);
}
@@ -1424,6 +1425,8 @@ purple_chat_conversation_constructed(GOb
if (purple_prefs_get_bool("/purple/logging/log_chats"))
purple_conversation_set_logging(PURPLE_CONVERSATION(chat), TRUE);
+
+ g_object_unref(account);
}
/* GObject dispose function */
diff --git a/libpurple/media.c b/libpurple/media.c
--- a/libpurple/media.c
+++ b/libpurple/media.c
@@ -198,8 +198,8 @@ purple_media_class_init (PurpleMediaClas
G_PARAM_READABLE));
g_object_class_install_property(gobject_class, PROP_ACCOUNT,
- g_param_spec_object("account", "PurpleAccount",
- "The account this media session is on.", PURPLE_TYPE_ACCOUNT,
+ g_param_spec_pointer("account", "PurpleAccount",
+ "The account this media session is on.",
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_CONFERENCE_TYPE,
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -1229,6 +1229,8 @@ pidgin_dialogs_alias_chat(PurpleChat *ch
_("Cancel"), NULL,
purple_chat_get_account(chat), NULL, NULL,
chat);
+
+ g_free(alias);
}
static void
More information about the Commits
mailing list