diff options
| author | Ross Burton <rburton@src.gnome.org> | 2005-05-20 11:14:45 +0000 |
|---|---|---|
| committer | Ross Burton <rburton@src.gnome.org> | 2005-05-20 11:14:45 +0000 |
| commit | 8e84309a58335035e937cf9bee9ec1d8cf044d36 (patch) | |
| tree | dbd65fdf8e2b9a2cdb5def95c9296ed292e218a8 | |
| parent | 8ab309106832bbdd7cb9bbc6f67fbc699e1c08ea (diff) | |
| download | evolution-data-server-8e84309a58335035e937cf9bee9ec1d8cf044d36.tar.gz | |
Fix pretty bad memory leak
| -rw-r--r-- | addressbook/ChangeLog | 5 | ||||
| -rw-r--r-- | addressbook/backends/file/e-book-backend-file.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 08b872e42..003884006 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2005-05-20 Ross Burton <ross@burtonini.com> + + * backends/file/e-book-backend-file.c: + Fix a large memory leak (the cursor was not being freed). + 2005-05-17 Sushma Rai <rsushma@novell.com> * libedata-book/e-book-backend-cache.c diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c index c834e1908..095059e31 100644 --- a/addressbook/backends/file/e-book-backend-file.c +++ b/addressbook/backends/file/e-book-backend-file.c @@ -128,6 +128,8 @@ build_summary (EBookBackendFilePrivate *bfpriv) db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT); } + + dbc->c_close (dbc); } static char * @@ -448,6 +450,11 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend, status = db_error != DB_NOTFOUND ? GNOME_Evolution_Addressbook_OtherError : GNOME_Evolution_Addressbook_Success; + + db_error = dbc->c_close(dbc); + if (db_error != 0) { + g_warning("Could not close cursor: %d", db_error); + } } *contacts = contact_list; |
