merge
authorEdouard Tisserant <edouard@pep-project.org>
Wed, 19 Apr 2017 18:45:31 +0200
changeset 1725e450d7db515d
parent 1724 a2a8ffce4a01
parent 1718 66080da35370
child 1726 ffc3cd3c5885
merge
     1.1 --- a/src/message_api.c	Wed Apr 19 18:31:57 2017 +0200
     1.2 +++ b/src/message_api.c	Wed Apr 19 18:45:31 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);