memset (Matches, 0, Matches_listsize);
memset (Completed, 0, sizeof (Completed));
+ nm_longrun_init(Context, FALSE);
+
/* Work out how many tags there are. */
if (nm_get_all_tags(Context, NULL, &tag_count_1) || tag_count_1 == 0)
- return 0;
+ goto done;
/* Free the old list, if any. */
if (nm_tags != NULL) {
tag_count_1 != tag_count_2) {
FREE (&nm_tags);
nm_tags = NULL;
+ nm_longrun_done(Context);
return -1;
}
matches_ensure_morespace (Num_matched);
Matches[Num_matched++] = User_typed;
+
+done:
+ nm_longrun_done(Context);
return 0;
}