[PATCH 04/20] util/crypto: _notmuch_message_crypto: tracks message-wide crypto state
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Jun 28 14:15:01 PDT 2018
On Fri 2018-06-15 07:16:05 -0300, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>> +_notmuch_message_crypto_set_sig_list (_notmuch_message_crypto_t *msg_crypto, GMimeSignatureList *sigs)
> It's a bit confusing that nothing in this API/patch seems to use the
> sig_list stored by this function
i've updated the commit message to explain that we will use it later :)
>> +_notmuch_message_crypto_cleanup (_notmuch_message_crypto_t *msg_crypto)
>> + if (!msg_crypto)
>> + return;
>> + if (msg_crypto->sig_list)
>> + g_object_unref (msg_crypto->sig_list);
> It _looks_ like you're planning on manually calling
> _notmuch_message_crypto_cleanup. In order to allow for hierarchical
> de-allocation (i.e. non-explicit de-allocation, we need to call
> talloc_set_destructor. There's a few examples in the the existing code.
ah, good call. in the revised version, that should be taken care of.
hopefully i even did it right :) thanks for the heads-up!
More information about the notmuch