On Tue, 25 Jan 2011 01:05:29 -0800
"Enlightenment SVN" <no-re...@enlightenment.org> wrote:

> Log:
> Still hunting (and killing) bugs with timeline loading.
>   
> 
> Author:       rui
> Date:         2011-01-25 01:05:28 -0800 (Tue, 25 Jan 2011)
> New Revision: 56297
> Trac:         http://trac.enlightenment.org/e/changeset/56297
> 

> Modified: trunk/elmdentica/src/statusnet.c
> ===================================================================
> --- trunk/elmdentica/src/statusnet.c  2011-01-25 03:04:33 UTC (rev
> 56296) +++ trunk/elmdentica/src/statusnet.c   2011-01-25 09:05:28 UTC
> (rev 56297) 
> @@ -141,26 +139,30 @@
>       as->account_type = ACCOUNT_TYPE_STATUSNET;
>       as->in_db = EINA_FALSE;
>  
> -     res = asprintf(&uid, "%d/%lld", account_id, (long long
> int)snS->user->id);
> +     res = asprintf(&uid, "%lld", (long long int)snS->user->id);
>       if(res != -1) {
>               au = eina_hash_find(userHash, uid);
>               if(au) {
>                       statusnet_User_free(snS->user);
> -                     snS->user = NULL;
>               } else {
>                       au = calloc(1, sizeof(anUser));
>                       au->user = snS->user;
>                       au->account_id = account_id;
>                       au->account_type = ACCOUNT_TYPE_STATUSNET;
> -                     au->created_at = curl_getdate(snS->user->created_at,
> NULL);
> +                     au->created_at = curl_getdate(au->user->created_at,
> NULL); eina_hash_add(userHash, uid, au);
>  
>                       user_insert(au, as->account_id);
>               }
>               as->au = au;
>               as->status->user = NULL;
> +             snS->user = NULL;
> +
> +             return(as);
>       }
> -     return(as);
> +
> +     free(as);
> +     return(NULL);
>  }
>  
>  void ed_statusnet_azy_agent_free(void *data) {
You need to either free(uid) in here or use a stack buffer if you don't want it
to leak.
-- 
Mike Blumenkrantz
Zentific: NULL pointer dereferences now 50% off!

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to