email = talloc_strdup (ctx, email);
DONE:
- /* XXX: How to free addresses here? */
+ if (addresses)
+ g_object_unref (addresses);
+
return email;
}
/* This result can be NULL for things like "unknown-8bit".
* Don't set a NULL filter as that makes GMime print
* annoying assertion-failure messages on stderr. */
- if (charset_filter)
+ if (charset_filter) {
g_mime_stream_filter_add (GMIME_STREAM_FILTER (stream_filter),
charset_filter);
+ g_object_unref (charset_filter);
+ }
+
}
wrapper = g_mime_part_get_content_object (GMIME_PART (part));
static void
format_part_content_raw (GMimeObject *part)
{
+ if (! GMIME_IS_PART (part))
+ return;
+
GMimeStream *stream_stdout;
GMimeStream *stream_filter = NULL;
GMimeDataWrapper *wrapper;
}
if (format->part_content)
- show_message_body (notmuch_message_get_filename (message),
- format, params);
+ show_message_body (message, format, params);
if (params->part <= 0) {
fputs (format->body_end, stdout);
while (!feof (file)) {
size = fread (buf, 1, sizeof (buf), file);
- fwrite (buf, size, 1, stdout);
+ (void) fwrite (buf, size, 1, stdout);
}
fclose (file);
params.cryptoctx = NULL;
params.decrypt = 0;
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;