]> git.notmuchmail.org Git - notmuch/commit - mime-node.c
mime-node: Clean up unwrapped MIME parts correctly.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 19 Mar 2020 05:41:45 +0000 (01:41 -0400)
committerDavid Bremner <david@tethera.net>
Mon, 23 Mar 2020 01:21:03 +0000 (22:21 -0300)
commit4dccb9928280bd60b79a662dc855187e7522ceba
tree26a2f82862bef6cfe6654a2f8a823297dfbb6dac
parent7de3d77d2d31abaea78e70f4da9d9f2a5ef84a58
mime-node: Clean up unwrapped MIME parts correctly.

Avoid a memory leak in the notmuch command line.

gmime_multipart_encrypted_decrypt returns a GMimeObject marked by
GMime as "transfer full", so we are supposed to clean up after it.

When parsing a message, notmuch would leak one GMimeObject part per
multipart/encrypted MIME layer.  We clean it up by analogy with
cleaning up the signature list associated with a MIME node.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
mime-node.c