Fixed memory leak when decrypting message from unknown peer.
authorEdouard Tisserant
Fri, 29 Jan 2016 19:19:09 +0100
changeset 433c8e149ad9df4
parent 432 55387ca1f999
child 435 b4476bf64274
child 439 2f03a972d016
Fixed memory leak when decrypting message from unknown peer.
src/message_api.c
     1.1 --- a/src/message_api.c	Fri Jan 29 18:46:10 2016 +0100
     1.2 +++ b/src/message_api.c	Fri Jan 29 19:19:09 2016 +0100
     1.3 @@ -1198,6 +1198,10 @@
     1.4  
     1.5              status = cryptotech[crypto].decrypt_and_verify(session, ctext,
     1.6                  csize, &re_ptext, &re_psize, &_keylist);
     1.7 +            
     1.8 +            if(re_ptext)
     1.9 +                free(re_ptext);
    1.10 +            
    1.11              if (status > PEP_CANNOT_DECRYPT_UNKNOWN)
    1.12                  goto pep_error;
    1.13