Fixed memory leak. Thanks Roker :)
authorKrista Bennett <krista@pep-project.org>
Thu, 02 Nov 2017 07:16:24 +0100
changeset 22317b8df6224c5a
parent 2230 29e0bfc4ca69
child 2264 3be5262e5e4a
Fixed memory leak. Thanks Roker :)
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Nov 01 16:23:58 2017 +0100
     1.2 +++ b/src/message_api.c	Thu Nov 02 07:16:24 2017 +0100
     1.3 @@ -884,6 +884,7 @@
     1.4          free_ptext=0;
     1.5      }
     1.6      free(_src);
     1.7 +    _src = NULL;
     1.8      assert(mimetext);
     1.9      if (mimetext == NULL)
    1.10          goto pep_error;
    1.11 @@ -927,6 +928,7 @@
    1.12  pep_error:
    1.13      if (free_ptext)
    1.14          free(ptext);
    1.15 +    free(_src);
    1.16      free(ctext);
    1.17      return status;
    1.18  }