sequoia: Avoid double free. sync
authorNeal H. Walfield <neal@pep.foundation>
Thu, 21 Mar 2019 14:33:56 +0100
branchsync
changeset 33702d309924ea61
parent 3369 44b98ddc4aed
child 3371 a9c437dd9eff
sequoia: Avoid double free.
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Thu Mar 21 14:32:58 2019 +0100
     1.2 +++ b/src/pgp_sequoia.c	Thu Mar 21 14:33:56 2019 +0100
     1.3 @@ -1378,10 +1378,8 @@
     1.4      ws = pgp_encryptor_new (&err, ws,
     1.5                              NULL, 0, keys, keys_count,
     1.6                              PGP_ENCRYPTION_MODE_FOR_TRANSPORT, 0);
     1.7 -    if (!ws) {
     1.8 -        pgp_writer_free(writer);
     1.9 +    if (!ws)
    1.10          ERROR_OUT(err, PEP_UNKNOWN_ERROR, "Setting up encryptor");
    1.11 -    }
    1.12  
    1.13      if (sign) {
    1.14          iter = pgp_tpk_key_iter_valid(signer_tpk);