]> granicus.if.org Git - neomutt/commit
Fix some context, data, and key memory leaks in gpgme.
authorKevin McCarthy <kevin@8t8.us>
Sat, 17 Jan 2015 22:34:13 +0000 (14:34 -0800)
committerKevin McCarthy <kevin@8t8.us>
Sat, 17 Jan 2015 22:34:13 +0000 (14:34 -0800)
commit61188050987aeaf2437aeba93f81be9e9cd8ae9f
treeb76c58e4e7b98113753447db65010948516bb3d5
parent2cea210ec86ffe65fe2eac9f6055a149b1be10ba
Fix some context, data, and key memory leaks in gpgme.

The context and data cleanup just involved adding missing
gpgme_release() and gpgme_data_release() calls in a few places.

The key usage was a little more involved:
  * Fix crypt_free_key().  It wasn't freeing the key passed in, and
    didn't work properly if multiple keys were passed in.  It also was
    missing a call to gpgme_key_unref().

  * Add free_recipient_set() to properly unref all the keys before
    freeing the array.

  * Fix get_candidates() to ref keys added to the crypt_key_t list, and
    unref the keys returned by gpgme_op_keylist_next().

  * Change usages of gpgme_key_release() to gpgme_key_unref().  The former
    was deprecated in gpgme version 0.4.1 (2003-06-06).
crypt-gpgme.c