Merged in ENGINE_198
authorKrista Bennett <krista@pep-project.org>
Wed, 19 Apr 2017 10:54:14 +0200
changeset 171866080da35370
parent 1712 af3d488f90d8
parent 1717 31e2c590f693
child 1725 e450d7db515d
Merged in ENGINE_198
     1.1 --- a/src/message_api.c	Wed Apr 19 10:38:44 2017 +0200
     1.2 +++ b/src/message_api.c	Wed Apr 19 10:54:14 2017 +0200
     1.3 @@ -2563,12 +2563,20 @@
     1.4                                                  keylist,
     1.5                                                  rating,
     1.6                                                  flags);
     1.7 -                                                
     1.8 +    if (decrypt_status > PEP_CANNOT_DECRYPT_UNKNOWN)
     1.9 +    {
    1.10 +        status = decrypt_status;
    1.11 +        goto pep_error;
    1.12 +    }
    1.13 +
    1.14      status = mime_encode_message(dec_msg, false, mime_plaintext);
    1.15  
    1.16      if (status == PEP_STATUS_OK)
    1.17 +    {
    1.18 +        free(tmp_msg);
    1.19          return decrypt_status;
    1.20 -        
    1.21 +    }
    1.22 +    
    1.23  pep_error:
    1.24      free_message(tmp_msg);
    1.25      free_message(dec_msg);