From f9158801b80f80734050a270dd9f41faa589844d Mon Sep 17 00:00:00 2001 From: Marcel Mol Date: Mon, 9 Aug 2010 22:43:55 +0200 Subject: [PATCH] obexd: Fix return value checking of e_book_async_get_contacts phonebook_create_cache() failed because checking the return value e_book_async_get_contacts() was wrong. This would lead to a core dump as the data was freed but was still used in the callbacks. --- obexd/plugins/phonebook-ebook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index 3c2410731..1598d5f36 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -459,7 +459,7 @@ int phonebook_create_cache(const char *name, phonebook_entry_cb entry_cb, ret = e_book_async_get_contacts(ebook, query, cache_cb, data); e_book_query_unref(query); - if (ret == FALSE) { + if (ret != FALSE) { g_free(data); return -EFAULT; } -- 2.47.3