Ignore:
Timestamp:
2016-04-17T09:32:27Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
720f7a9
Parents:
991c75f
Message:

twitter: Fix a couple of leaks of mutes_ids and retweets_ids

Just freeing the list on logout and when removing items from them.

Also remove the "checking mutes" debug which is disproportionately noisy
compared to the rest of the protocol.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r991c75f ra244877  
    955955        /* Check this is not a tweet that should be muted */
    956956        uid_str = g_strdup_printf("%" PRIu64, status->user->uid);
    957         if (getenv("BITLBEE_DEBUG")) {
    958                 GSList *item;
    959                 fprintf(stderr, "Checking mutes; this uid=%s\n", uid_str);
    960                 for (item = td->mutes_ids; item != NULL; item = item->next) {
    961                         fprintf(stderr, "  id: %s\n", (char *)item->data);
    962                 }
    963         }
     957
    964958        if (g_slist_find_custom(td->mutes_ids, uid_str, (GCompareFunc)strcmp)) {
    965959                g_free(uid_str);
     
    11641158                if ((found = g_slist_find_custom(td->mutes_ids, uid_str,
    11651159                                                (GCompareFunc)strcmp))) {
    1166                         td->mutes_ids = g_slist_remove(td->mutes_ids, found);
     1160                        char *found_str = found->data;
     1161                        td->mutes_ids = g_slist_delete_link(td->mutes_ids, found);
     1162                        g_free(found_str);
    11671163                }
    11681164                g_free(uid_str);
Note: See TracChangeset for help on using the changeset viewer.