2008-03-05 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Wed, 5 Mar 2008 19:58:41 +0000 (19:58 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Wed, 5 Mar 2008 19:58:41 +0000 (19:58 +0000)
* decrypt.c (release_op_data): Release OPD->result.recipients.
* encrypt.c (release_op_data): Release invalid_recipient.

trunk/gpgme/ChangeLog
trunk/gpgme/decrypt.c
trunk/gpgme/encrypt.c

index 2a5c7191f03d25ca8575daeb332b4bc572fa54a8..8285ff85470176f7c6f48b97f3abc00dcc85ff1e 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-05  Marcus Brinkmann  <marcus@g10code.de>
+
+       * decrypt.c (release_op_data): Release OPD->result.recipients.
+       * encrypt.c (release_op_data): Release invalid_recipient.
+
 2008-02-15  Marcus Brinkmann  <marcus@g10code.de>
 
        * engine-gpgconf.c (gpgconf_read): Fix end-of-line handline.
index 5ce21bad0205954f9dae38777a15d8d6d2aaabd5..66250b129f58f94db8020ebe88cbf148c459b06c 100644 (file)
@@ -50,12 +50,20 @@ static void
 release_op_data (void *hook)
 {
   op_data_t opd = (op_data_t) hook;
+  gpgme_recipient_t recipient = opd->result.recipients;
 
   if (opd->result.unsupported_algorithm)
     free (opd->result.unsupported_algorithm);
 
   if (opd->result.file_name)
     free (opd->result.file_name);
+
+  while (recipient)
+    {
+      gpgme_recipient_t next = recipient->next;
+      free (recipient);
+      recipient = next;
+    }
 }
 
 
index a7a1f4de9900c0b6f4afe35f512fba17906f4d8b..4744090d715eac1cf8dc63efb7edd39e68e1ad24 100644 (file)
@@ -53,6 +53,7 @@ release_op_data (void *hook)
       gpgme_invalid_key_t next = invalid_recipient->next;
       if (invalid_recipient->fpr)
        free (invalid_recipient->fpr);
+      free (invalid_recipient);
       invalid_recipient = next;
     }
 }