start branch ENGINE-198 ENGINE-198
authorRoker <roker@pep-project.org>
Tue, 18 Apr 2017 09:51:29 +0200
branchENGINE-198
changeset 1708df98570bb9cf
parent 1707 6c6e4315ba6f
child 1715 dcd33a52a194
start branch ENGINE-198
src/message_api.c
     1.1 --- a/src/message_api.c	Thu Mar 30 17:32:55 2017 +0200
     1.2 +++ b/src/message_api.c	Tue Apr 18 09:51:29 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_STATUS_OK)
     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);