Re: [evolution-patches] initial addressbook patches
- From: Chris Toshok <toshok ximian com>
- To: Larry Ewing <lewing ximian com>
- Cc: patches <evolution-patches ximian com>
- Subject: Re: [evolution-patches] initial addressbook patches
- Date: 13 Jun 2003 15:38:36 -0700
On Fri, 2003-06-13 at 11:07, Larry Ewing wrote:
> This isn't complete but I thought I'd get what I have out there for
> people to look at while I continue working on it.
> RCS file:
> /cvs/gnome/evolution/addressbook/gui/widgets/e-addressbook-util.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 e-addressbook-util.c
> --- widgets/e-addressbook-util.c 10 Mar 2003 06:40:18
> -0000 1.25
> +++ widgets/e-addressbook-util.c 13 Jun 2003 18:04:10 -0000
> @@ -571,15 +572,17 @@ e_addressbook_send_card_list (GList *car
> g_object_get(card,
> "file_as", &tempstr2,
> NULL);
> - if (!tempstr2 || !*tempstr2)
> + if (!tempstr2 || !*tempstr2) {
> g_object_get(card,
> "full_name", &tempstr2,
> NULL);
> - if (!tempstr2 || !*tempstr2)
> + g_free (tempstr2);
> + } if (!tempstr2 || !*tempstr2) {
> g_object_get(card,
> "org", &tempstr2,
> NULL);
> - if (!tempstr2 || !*tempstr2) {
> + g_free (tempstr2);
> + } if (!tempstr2 || !*tempstr2) {
> EList *list;
> EIterator *iterator;
> g_object_get(card,
This seems broken (you're checking *tempstr2 after it's been freed.)
probably want to move the g_frees up right after the ifs, so:
if (!tempstr2 || !*tempstr2) {
g_free (tempstr2);
g_object_get (...);
}
and add a "g_free (tempstr2);" around the "g_free (tempstr);" at the end
of that block.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]