mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
Unbreak several notmuch commands after the addition of configuration.
All of the following commands: notmuch dump notmuch reply notmuch restore notmuch search notmuch show notmuch tag were calling notmuch_database_open with an argument of NULL. This was a legitimate call until the recent addition of configuration, after which it is expected that all commands will lookup the correct path in the configuration file. So fix all these commands to do that. Also, while touching all of these commands, we fix them to use the talloc context that is passed in rather than creating a local talloc context. We also switch from using goto for return values, to doing direct returns as soon as an error is detected, (which can be leak free thanks to talloc).
This commit is contained in:
parent
37bdd89870
commit
13569ad6c9
6 changed files with 114 additions and 149 deletions
|
@ -23,41 +23,40 @@
|
||||||
int
|
int
|
||||||
notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
|
notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FILE *output = NULL;
|
notmuch_config_t *config;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_database_t *notmuch;
|
||||||
notmuch_query_t *query;
|
notmuch_query_t *query;
|
||||||
|
FILE *output;
|
||||||
notmuch_messages_t *messages;
|
notmuch_messages_t *messages;
|
||||||
notmuch_message_t *message;
|
notmuch_message_t *message;
|
||||||
notmuch_tags_t *tags;
|
notmuch_tags_t *tags;
|
||||||
int ret = 0;
|
|
||||||
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
|
if (config == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
query = notmuch_query_create (notmuch, "");
|
||||||
|
if (query == NULL) {
|
||||||
|
fprintf (stderr, "Out of memory\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID);
|
||||||
|
|
||||||
if (argc) {
|
if (argc) {
|
||||||
output = fopen (argv[0], "w");
|
output = fopen (argv[0], "w");
|
||||||
if (output == NULL) {
|
if (output == NULL) {
|
||||||
fprintf (stderr, "Error opening %s for writing: %s\n",
|
fprintf (stderr, "Error opening %s for writing: %s\n",
|
||||||
argv[0], strerror (errno));
|
argv[0], strerror (errno));
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
output = stdout;
|
output = stdout;
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
|
||||||
if (notmuch == NULL) {
|
|
||||||
ret = 1;
|
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
query = notmuch_query_create (notmuch, "");
|
|
||||||
if (query == NULL) {
|
|
||||||
fprintf (stderr, "Out of memory\n");
|
|
||||||
ret = 1;
|
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID);
|
|
||||||
|
|
||||||
for (messages = notmuch_query_search_messages (query);
|
for (messages = notmuch_query_search_messages (query);
|
||||||
notmuch_messages_has_more (messages);
|
notmuch_messages_has_more (messages);
|
||||||
notmuch_messages_advance (messages))
|
notmuch_messages_advance (messages))
|
||||||
|
@ -85,13 +84,11 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
|
||||||
notmuch_message_destroy (message);
|
notmuch_message_destroy (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_query_destroy (query);
|
if (output != stdout)
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
|
||||||
if (output && output != stdout)
|
|
||||||
fclose (output);
|
fclose (output);
|
||||||
|
|
||||||
return ret;
|
notmuch_query_destroy (query);
|
||||||
|
notmuch_database_close (notmuch);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,10 +123,10 @@ add_recipients_for_string (GMimeMessage *message,
|
||||||
int
|
int
|
||||||
notmuch_reply_command (void *ctx, int argc, char *argv[])
|
notmuch_reply_command (void *ctx, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
void *local = talloc_new (ctx);
|
notmuch_config_t *config;
|
||||||
notmuch_query_t *query = NULL;
|
notmuch_database_t *notmuch;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_query_t *query;
|
||||||
GMimeMessage *reply = NULL;
|
GMimeMessage *reply;
|
||||||
char *query_string;
|
char *query_string;
|
||||||
notmuch_messages_t *messages;
|
notmuch_messages_t *messages;
|
||||||
notmuch_message_t *message;
|
notmuch_message_t *message;
|
||||||
|
@ -145,24 +145,24 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
|
||||||
};
|
};
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
if (notmuch == NULL) {
|
if (config == NULL)
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
query_string = query_string_from_args (local, argc, argv);
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
query_string = query_string_from_args (ctx, argc, argv);
|
||||||
if (query_string == NULL) {
|
if (query_string == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
query = notmuch_query_create (notmuch, query_string);
|
query = notmuch_query_create (notmuch, query_string);
|
||||||
if (query == NULL) {
|
if (query == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (messages = notmuch_query_search_messages (query);
|
for (messages = notmuch_query_search_messages (query);
|
||||||
|
@ -175,8 +175,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
|
||||||
reply = g_mime_message_new (1);
|
reply = g_mime_message_new (1);
|
||||||
if (reply == NULL) {
|
if (reply == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: We need a configured email address (or addresses) for
|
/* XXX: We need a configured email address (or addresses) for
|
||||||
|
@ -230,18 +229,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
|
||||||
notmuch_message_destroy (message);
|
notmuch_message_destroy (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (local)
|
|
||||||
talloc_free (local);
|
|
||||||
|
|
||||||
if (query)
|
|
||||||
notmuch_query_destroy (query);
|
notmuch_query_destroy (query);
|
||||||
|
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
notmuch_database_close (notmuch);
|
||||||
|
|
||||||
if (reply)
|
|
||||||
g_object_unref (G_OBJECT (reply));
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,34 +23,35 @@
|
||||||
int
|
int
|
||||||
notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
|
notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FILE *input = NULL;
|
notmuch_config_t *config;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_database_t *notmuch;
|
||||||
|
FILE *input;
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
size_t line_size;
|
size_t line_size;
|
||||||
ssize_t line_len;
|
ssize_t line_len;
|
||||||
regex_t regex;
|
regex_t regex;
|
||||||
int rerr;
|
int rerr;
|
||||||
int ret = 0;
|
|
||||||
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
|
if (config == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (argc) {
|
if (argc) {
|
||||||
input = fopen (argv[0], "r");
|
input = fopen (argv[0], "r");
|
||||||
if (input == NULL) {
|
if (input == NULL) {
|
||||||
fprintf (stderr, "Error opening %s for reading: %s\n",
|
fprintf (stderr, "Error opening %s for reading: %s\n",
|
||||||
argv[0], strerror (errno));
|
argv[0], strerror (errno));
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf ("No filename given. Reading dump from stdin.\n");
|
printf ("No filename given. Reading dump from stdin.\n");
|
||||||
input = stdin;
|
input = stdin;
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
|
||||||
if (notmuch == NULL) {
|
|
||||||
ret = 1;
|
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dump output is one line per message. We match a sequence of
|
/* Dump output is one line per message. We match a sequence of
|
||||||
* non-space characters for the message-id, then one or more
|
* non-space characters for the message-id, then one or more
|
||||||
* spaces, then a list of space-separated tags as a sequence of
|
* spaces, then a list of space-separated tags as a sequence of
|
||||||
|
@ -118,13 +119,12 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
|
||||||
|
|
||||||
regfree (®ex);
|
regfree (®ex);
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (line)
|
if (line)
|
||||||
free (line);
|
free (line);
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
notmuch_database_close (notmuch);
|
||||||
if (input && input != stdin)
|
if (input != stdin)
|
||||||
fclose (input);
|
fclose (input);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
int
|
int
|
||||||
notmuch_search_command (void *ctx, int argc, char *argv[])
|
notmuch_search_command (void *ctx, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
void *local = talloc_new (ctx);
|
notmuch_config_t *config;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_database_t *notmuch;
|
||||||
notmuch_query_t *query;
|
notmuch_query_t *query;
|
||||||
notmuch_threads_t *threads;
|
notmuch_threads_t *threads;
|
||||||
notmuch_thread_t *thread;
|
notmuch_thread_t *thread;
|
||||||
|
@ -32,21 +32,25 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
|
||||||
char *query_str;
|
char *query_str;
|
||||||
const char *relative_date;
|
const char *relative_date;
|
||||||
time_t date;
|
time_t date;
|
||||||
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
|
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
if (notmuch == NULL) {
|
if (config == NULL)
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
query_str = query_string_from_args (ctx, argc, argv);
|
||||||
|
if (query_str == NULL) {
|
||||||
|
fprintf (stderr, "Out of moemory.\n");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
query_str = query_string_from_args (local, argc, argv);
|
|
||||||
|
|
||||||
query = notmuch_query_create (notmuch, query_str);
|
query = notmuch_query_create (notmuch, query_str);
|
||||||
if (query == NULL) {
|
if (query == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (threads = notmuch_query_search_threads (query);
|
for (threads = notmuch_query_search_threads (query);
|
||||||
|
@ -58,7 +62,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
|
||||||
thread = notmuch_threads_get (threads);
|
thread = notmuch_threads_get (threads);
|
||||||
|
|
||||||
date = notmuch_thread_get_oldest_date (thread);
|
date = notmuch_thread_get_oldest_date (thread);
|
||||||
relative_date = notmuch_time_relative_date (local, date);
|
relative_date = notmuch_time_relative_date (ctx, date);
|
||||||
|
|
||||||
printf ("thread:%s %12s %s",
|
printf ("thread:%s %12s %s",
|
||||||
notmuch_thread_get_thread_id (thread),
|
notmuch_thread_get_thread_id (thread),
|
||||||
|
@ -81,11 +85,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_query_destroy (query);
|
notmuch_query_destroy (query);
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
notmuch_database_close (notmuch);
|
||||||
talloc_free (local);
|
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,13 +120,12 @@ show_part(GMimeObject *part, int *part_count)
|
||||||
int
|
int
|
||||||
notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
{
|
{
|
||||||
void *local = talloc_new (ctx);
|
notmuch_config_t *config;
|
||||||
char *query_string;
|
notmuch_database_t *notmuch;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_query_t *query;
|
||||||
notmuch_query_t *query = NULL;
|
|
||||||
notmuch_messages_t *messages;
|
notmuch_messages_t *messages;
|
||||||
notmuch_message_t *message;
|
notmuch_message_t *message;
|
||||||
int ret = 0;
|
char *query_string;
|
||||||
|
|
||||||
const char *headers[] = {
|
const char *headers[] = {
|
||||||
"From", "To", "Cc", "Bcc", "Date"
|
"From", "To", "Cc", "Bcc", "Date"
|
||||||
|
@ -134,24 +133,24 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
const char *name, *value;
|
const char *name, *value;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
if (notmuch == NULL) {
|
if (config == NULL)
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
query_string = query_string_from_args (local, argc, argv);
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
query_string = query_string_from_args (ctx, argc, argv);
|
||||||
if (query_string == NULL) {
|
if (query_string == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
query = notmuch_query_create (notmuch, query_string);
|
query = notmuch_query_create (notmuch, query_string);
|
||||||
if (query == NULL) {
|
if (query == NULL) {
|
||||||
fprintf (stderr, "Out of memory\n");
|
fprintf (stderr, "Out of memory\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (messages = notmuch_query_search_messages (query);
|
for (messages = notmuch_query_search_messages (query);
|
||||||
|
@ -166,7 +165,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
|
|
||||||
printf ("\fheader{\n");
|
printf ("\fheader{\n");
|
||||||
|
|
||||||
printf ("%s\n", _get_one_line_summary (local, message));
|
printf ("%s\n", _get_one_line_summary (ctx, message));
|
||||||
|
|
||||||
printf ("%s\n", notmuch_message_get_header (message, "subject"));
|
printf ("%s\n", notmuch_message_get_header (message, "subject"));
|
||||||
|
|
||||||
|
@ -189,15 +188,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
notmuch_message_destroy (message);
|
notmuch_message_destroy (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (local)
|
|
||||||
talloc_free (local);
|
|
||||||
|
|
||||||
if (query)
|
|
||||||
notmuch_query_destroy (query);
|
notmuch_query_destroy (query);
|
||||||
|
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
notmuch_database_close (notmuch);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,34 +23,27 @@
|
||||||
int
|
int
|
||||||
notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[]))
|
notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
{
|
{
|
||||||
void *local;
|
|
||||||
int *add_tags, *remove_tags;
|
int *add_tags, *remove_tags;
|
||||||
int add_tags_count = 0;
|
int add_tags_count = 0;
|
||||||
int remove_tags_count = 0;
|
int remove_tags_count = 0;
|
||||||
char *query_string;
|
char *query_string;
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_config_t *config;
|
||||||
|
notmuch_database_t *notmuch;
|
||||||
notmuch_query_t *query;
|
notmuch_query_t *query;
|
||||||
notmuch_messages_t *messages;
|
notmuch_messages_t *messages;
|
||||||
notmuch_message_t *message;
|
notmuch_message_t *message;
|
||||||
int ret = 0;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
local = talloc_new (ctx);
|
add_tags = talloc_size (ctx, argc * sizeof (int));
|
||||||
if (local == NULL) {
|
|
||||||
ret = 1;
|
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
add_tags = talloc_size (local, argc * sizeof (int));
|
|
||||||
if (add_tags == NULL) {
|
if (add_tags == NULL) {
|
||||||
ret = 1;
|
fprintf (stderr, "Out of memory.\n");
|
||||||
goto DONE;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_tags = talloc_size (local, argc * sizeof (int));
|
remove_tags = talloc_size (ctx, argc * sizeof (int));
|
||||||
if (remove_tags == NULL) {
|
if (remove_tags == NULL) {
|
||||||
ret = 1;
|
fprintf (stderr, "Out of memory.\n");
|
||||||
goto DONE;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
|
@ -69,29 +62,28 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
|
|
||||||
if (add_tags_count == 0 && remove_tags_count == 0) {
|
if (add_tags_count == 0 && remove_tags_count == 0) {
|
||||||
fprintf (stderr, "Error: 'notmuch tag' requires at least one tag to add or remove.\n");
|
fprintf (stderr, "Error: 'notmuch tag' requires at least one tag to add or remove.\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == argc) {
|
if (i == argc) {
|
||||||
fprintf (stderr, "Error: 'notmuch tag' requires at least one search term.\n");
|
fprintf (stderr, "Error: 'notmuch tag' requires at least one search term.\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch = notmuch_database_open (NULL);
|
config = notmuch_config_open (ctx, NULL, NULL);
|
||||||
if (notmuch == NULL) {
|
if (config == NULL)
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
query_string = query_string_from_args (local, argc - i, &argv[i]);
|
notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
|
||||||
|
if (notmuch == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
query_string = query_string_from_args (ctx, argc - i, &argv[i]);
|
||||||
|
|
||||||
query = notmuch_query_create (notmuch, query_string);
|
query = notmuch_query_create (notmuch, query_string);
|
||||||
if (query == NULL) {
|
if (query == NULL) {
|
||||||
fprintf (stderr, "Out of memory.\n");
|
fprintf (stderr, "Out of memory.\n");
|
||||||
ret = 1;
|
return 1;
|
||||||
goto DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (messages = notmuch_query_search_messages (query);
|
for (messages = notmuch_query_search_messages (query);
|
||||||
|
@ -115,12 +107,7 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_query_destroy (query);
|
notmuch_query_destroy (query);
|
||||||
|
|
||||||
DONE:
|
|
||||||
if (notmuch)
|
|
||||||
notmuch_database_close (notmuch);
|
notmuch_database_close (notmuch);
|
||||||
|
|
||||||
talloc_free (local);
|
return 0;
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue