Skip to content

Commit

Permalink
lib-mail: start relying on mail_html2text_deinit(NULL) being a no-op
Browse files Browse the repository at this point in the history
Cleanup performed with the following semantic patch:

	@@
	expression E;
	@@

	- if (E != NULL) {
	-       mail_html2text_deinit(&E);
	- }
	+ mail_html2text_deinit(&E);
  • Loading branch information
Josef 'Jeff' Sipek authored and cmouse committed Jan 31, 2018
1 parent 86174ed commit a2e1929
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib-mail/message-snippet.c
Expand Up @@ -138,8 +138,7 @@ int message_snippet_generate(struct istream *input,
i_assert(ret != 0);
message_decoder_deinit(&decoder);
message_parser_deinit(&parser, &parts);
if (ctx.html2text != NULL)
mail_html2text_deinit(&ctx.html2text);
mail_html2text_deinit(&ctx.html2text);
pool_unref(&pool);
return input->stream_errno == 0 ? 0 : -1;
}

0 comments on commit a2e1929

Please sign in to comment.