Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2018-02-15 18:42:32 +0300
committerdequis <dx@dxzone.com.ar>2018-02-15 18:42:32 +0300
commit7653e76a85c12085866e08e78ed1b89c9ef0b7e1 (patch)
tree72d8a9683141b91ebbcae2281a0f86797f96c3d8
parentc442007ea12f33cd82460a0e6c88c0c8d93daa58 (diff)
Fix a leak of a few vdms_token and one JsonObject
-rw-r--r--skypeweb/libskypeweb.c1
-rw-r--r--skypeweb/skypeweb_messages.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/skypeweb/libskypeweb.c b/skypeweb/libskypeweb.c
index 9cb8453..8392073 100644
--- a/skypeweb/libskypeweb.c
+++ b/skypeweb/libskypeweb.c
@@ -405,6 +405,7 @@ skypeweb_close(PurpleConnection *pc)
g_hash_table_destroy(sa->sent_messages_hash);
+ g_free(sa->vdms_token);
g_free(sa->messages_host);
g_free(sa->skype_token);
g_free(sa->registration_token);
diff --git a/skypeweb/skypeweb_messages.c b/skypeweb/skypeweb_messages.c
index da77420..d24e794 100644
--- a/skypeweb/skypeweb_messages.c
+++ b/skypeweb/skypeweb_messages.c
@@ -1043,13 +1043,15 @@ skypeweb_subscribe_to_contact_status(SkypeWebAccount *sa, GSList *contacts)
contacts_array = json_array_new();
do {
- JsonObject *contact = json_object_new();
+ JsonObject *contact;
gchar *id;
if (SKYPEWEB_BUDDY_IS_BOT(cur->data)) {
purple_protocol_got_user_status(sa->account, cur->data, SKYPEWEB_STATUS_ONLINE, NULL);
continue;
}
+
+ contact = json_object_new();
id = g_strconcat(skypeweb_user_url_prefix(cur->data), cur->data, NULL);
json_object_set_string_member(contact, "id", id);
@@ -1205,6 +1207,7 @@ skypeweb_got_vdms_token(PurpleHttpConnection *http_conn, PurpleHttpResponse *res
JsonObject *obj = json_node_get_object(root);
token = json_object_get_string_member(obj, "token");
+ g_free(sa->vdms_token);
sa->vdms_token = g_strdup(token);
sa->vdms_expiry = (int)time(NULL) + SKYPEWEB_VDMS_TTL;
}