diff --git a/src/trackerd/tracker-db-sqlite.c b/src/trackerd/tracker-db-sqlite.c index 93030a5..9a4a409 100644 --- a/src/trackerd/tracker-db-sqlite.c +++ b/src/trackerd/tracker-db-sqlite.c @@ -2134,6 +2134,8 @@ tracker_db_get_file_contents_words (DBConnection *db_con, guint32 id, GHashTable tracker_error ("WARNING: retrieval of text contents has failed"); } + g_free (str_file_id); + return old_table; } diff --git a/src/trackerd/tracker-email-utils.c b/src/trackerd/tracker-email-utils.c index d0f9608..b9a4def 100644 --- a/src/trackerd/tracker-email-utils.c +++ b/src/trackerd/tracker-email-utils.c @@ -177,10 +177,8 @@ email_parse_mail_file_and_save_new_emails (DBConnection *db_con, MailApplication tracker->index_count++; - if (tracker->verbosity == 1) { - if ( (tracker->index_count == 100 || (tracker->index_count >= 500 && tracker->index_count%500 == 0)) && (tracker->verbosity == 1)) { - tracker_log ("indexing #%d - Emails in %s", tracker->index_count, path); - } + if (tracker->verbosity == 1 && (tracker->index_count == 100 || (tracker->index_count >= 500 && tracker->index_count%500 == 0))) { + tracker_log ("indexing #%d - Emails in %s", tracker->index_count, path); } tracker_check_flush (); @@ -1045,7 +1043,8 @@ find_attachment (GMimeObject *obj, gpointer data) char *attachment_uri; int fd; - content_type = g_mime_part_get_content_type (part); + if (! (content_type = g_mime_part_get_content_type (part))) + return; filename = g_mime_part_get_filename (part); diff --git a/src/trackerd/trackerd.c b/src/trackerd/trackerd.c index b9277e6..7108f0f 100644 --- a/src/trackerd/trackerd.c +++ b/src/trackerd/trackerd.c @@ -367,13 +367,13 @@ add_dirs_to_watch_list (GSList *dir_list, gboolean check_dirs, DBConnection *db_ str = (char *) tmp->data; - if (!tracker_file_is_no_watched (str)) { + if (str && !tracker_file_is_no_watched (str)) { tracker->dir_list = g_slist_prepend (tracker->dir_list, g_strdup (str)); if ( ((tracker_count_watch_dirs () + g_slist_length (dir_list)) < tracker->watch_limit)) { - if (!tracker_add_watch_dir (str, db_con) && tracker_is_directory (str) && str) { + if (!tracker_add_watch_dir (str, db_con) && tracker_is_directory (str)) { tracker_debug ("Watch failed for %s", str); }