Changeset 199fea6


Ignore:
Timestamp:
2011-12-26T18:17:51Z (8 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f1849a8
Parents:
5f40da7
Message:

Fixing memory leak in Twitter module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r5f40da7 r199fea6  
    44*  Simple module to facilitate twitter functionality.                       *
    55*                                                                           *
    6 *  Copyright 2009 Geert Mulders <g.c.w.m.mulders@gmail.com>                 *
     6*  Copyright 2009-2010 Geert Mulders <g.c.w.m.mulders@gmail.com>            *
     7*  Copyright 2010-2011 Wilmer van der Gaast <wilmer@gaast.net>              *
    78*                                                                           *
    89*  This library is free software; you can redistribute it and/or            *
     
    786787        g_slist_free(output);
    787788
    788         if (home_timeline && home_timeline->list) {
    789                 txl_free(home_timeline);
    790         }
    791 
    792         if (mentions && mentions->list) {
    793                 txl_free(mentions);
    794         }
     789        txl_free(home_timeline);
     790        txl_free(mentions);
    795791
    796792        td->flags &= ~(TWITTER_DOING_TIMELINE | TWITTER_GOT_TIMELINE | TWITTER_GOT_MENTIONS);
     793        td->home_timeline_obj = td->mentions_obj = NULL;
    797794}
    798795
     
    804801        struct twitter_data *td = ic->proto_data;
    805802
     803        txl_free(td->home_timeline_obj);
    806804        td->home_timeline_obj = NULL;
    807805        td->flags &= ~TWITTER_GOT_TIMELINE;
     
    839837        struct twitter_data *td = ic->proto_data;
    840838
     839        txl_free(td->mentions_obj);
    841840        td->mentions_obj = NULL;
    842841        td->flags &= ~TWITTER_GOT_MENTIONS;
Note: See TracChangeset for help on using the changeset viewer.