fixed #44 : memleak ptext not freed before reuse in message_api.c
authorEdouard Tisserant
Tue, 12 Jul 2016 13:49:08 +0200
changeset 842baab4fe95591
parent 841 bb25b36f52d6
child 844 8e7266b5a89c
fixed #44 : memleak ptext not freed before reuse in message_api.c
src/message_api.c
     1.1 --- a/src/message_api.c	Tue Jul 12 12:29:10 2016 +0200
     1.2 +++ b/src/message_api.c	Tue Jul 12 13:49:08 2016 +0200
     1.3 @@ -1328,6 +1328,9 @@
     1.4                          attctext = _s->value;
     1.5                          attcsize = _s->size;
     1.6  
     1.7 +                        free(ptext);
     1.8 +                        ptext = NULL;
     1.9 +
    1.10                          status = decrypt_and_verify(session, attctext, attcsize,
    1.11                                  &ptext, &psize, &_keylist);
    1.12                          free_stringlist(_keylist);