BUG: missing free...()
authorvb
Sun, 08 Feb 2015 15:39:36 -0500
changeset 56eb39f8399076
parent 55 0569864cb34e
child 57 03f99659418e
BUG: missing free...()
src/message_api.c
     1.1 --- a/src/message_api.c	Sun Feb 08 15:18:48 2015 -0500
     1.2 +++ b/src/message_api.c	Sun Feb 08 15:39:36 2015 -0500
     1.3 @@ -39,8 +39,11 @@
     1.4      }
     1.5  
     1.6      message *msg = new_message(src->dir, from, to, NULL);
     1.7 -    if (msg == NULL)
     1.8 +    if (msg == NULL) {
     1.9 +        free_identity(from);
    1.10 +        free_identity_list(to);
    1.11          return PEP_OUT_OF_MEMORY;
    1.12 +    }
    1.13      msg->enc_format = PEP_enc_pieces;
    1.14  
    1.15      from->me = true;