From a02fa90f6bf22660bc1561364d6ce19ed37e6988 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 12 Sep 2005 19:06:45 +0000 Subject: [PATCH] 2005-09-12 Marcus Brinkmann * keylist.c (release_op_data): Do not free opd->tmp_uid. --- gpgme/ChangeLog | 4 ++++ gpgme/keylist.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 9affd16..53c707b 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2005-09-12 Marcus Brinkmann + + * keylist.c (release_op_data): Do not free opd->tmp_uid. + 2005-08-26 Marcus Brinkmann * rungpg.c (command_handler): Use _gpgme_io_write instead of write. diff --git a/gpgme/keylist.c b/gpgme/keylist.c index e26ddf0..8f9cf37 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -48,6 +48,7 @@ typedef struct struct _gpgme_op_keylist_result result; gpgme_key_t tmp_key; + /* This points to the last uid in tmp_key. */ gpgme_user_id_t tmp_uid; /* Something new is available. */ int key_cond; @@ -63,8 +64,9 @@ release_op_data (void *hook) if (opd->tmp_key) gpgme_key_unref (opd->tmp_key); - if (opd->tmp_uid) - free (opd->tmp_uid); + /* opd->tmp_uid is actually part of opd->tmp_key, so we do not need + to release it here. */ + while (key) { struct key_queue_item_s *next = key->next; -- 2.26.2