diff options
author | Larry Ewing <lewing@ximian.com> | 2001-09-18 13:11:31 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2001-09-18 13:11:31 +0800 |
commit | f774ea81e5d3e2607da601eeaf1b875dbe5b259a (patch) | |
tree | a5d05b888a2defa080f5b3e3c229c30055724828 /addressbook/backend/ebook/e-book-util.c | |
parent | 1e710cd9ea5b40329045e9cb5958f47cf7f79189 (diff) | |
download | gsoc2013-evolution-f774ea81e5d3e2607da601eeaf1b875dbe5b259a.tar.gz gsoc2013-evolution-f774ea81e5d3e2607da601eeaf1b875dbe5b259a.tar.zst gsoc2013-evolution-f774ea81e5d3e2607da601eeaf1b875dbe5b259a.zip |
use g_strfreev. (match_name): s/g_free/g_strfreev. (match_file_as):
2001-09-17 Larry Ewing <lewing@ximian.com>
* gui/component/select-names/e-select-names-completion.c
(name_style_query): use g_strfreev.
(match_name): s/g_free/g_strfreev.
(match_file_as): s/g_free/g_strfreev.
* backend/ebook/e-book-util.c (e_book_name_and_email_query): fix
the memory handling here. All there members of the vector need to
be freed all the time.
* backend/ebook/load-pine-addressbook.c (parse_line): free the
string outside of the test that makes sure there are three
entries.
svn path=/trunk/; revision=12936
Diffstat (limited to 'addressbook/backend/ebook/e-book-util.c')
-rw-r--r-- | addressbook/backend/ebook/e-book-util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c index 3943117ce0..5e291eb73c 100644 --- a/addressbook/backend/ebook/e-book-util.c +++ b/addressbook/backend/ebook/e-book-util.c @@ -417,8 +417,12 @@ e_book_name_and_email_query (EBook *book, namev = g_strsplit (" ", name_cpy, 0); for (i=0; namev[i]; ++i) { if (*namev[i]) { + char *str = name[i]; + namev[i] = g_strdup_printf ("(contains \"file_as\" \"%s\")", namev[i]); ++count; + + g_free (str); } } @@ -430,12 +434,8 @@ e_book_name_and_email_query (EBook *book, qjoined = NULL; } - g_free (name_cpy); - for (i=0; namev[i]; ++i) - if (*namev[i]) - g_free (namev[i]); - g_free (namev); + g_strfreev (namev); g_free (qjoined); } |