Re: [evolution-patches] patch for #60296 Calendar
- From: Rodrigo Moya <rodrigo novell com>
 
- To: Sivaiah Nallagatla <snallagatla novell com>
 
- Cc: Evolution Patches <evolution-patches ximian com>
 
- Subject: Re: [evolution-patches] patch for #60296 Calendar
 
- Date: Sun, 04 Jul 2004 13:40:52 +0200
 
On Thu, 2004-07-01 at 21:33 +0530, Sivaiah N wrote:
> Hi,
> Attached small patch fixes a crash happening when a groupwise task is
> marked as completed . Crash is due to trying to use an uninitialized
> variable.
> -
> +               
> +               cal_organizer = g_new0 (ECalComponentOrganizer, 1);
>                 e_cal_component_get_organizer (comp, cal_organizer);
>                 if (cal_organizer) {
>                         organizer = g_new0 (EGwItemOrganizer, 1);
>                         organizer->display_name = g_strdup
> (cal_organizer->cn);
>                         organizer->email = g_strdup (cal_organizer-
> >value + 7);
>                         e_gw_item_set_organizer (item, organizer);
> +                       g_free (cal_organizer);
>                 }
> +               
>         }
you will always have to g_free the cal_organizer, since you allocated it
previously. So, maybe it's probably better to use a
'ECalComponentOrganizer' struct, that is, not a pointer, and so remove
the need to g_new0 it?
cheers
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]