sync/gen_actions_skeleton.ysl2
changeset 743 e4b613ebac2f
parent 692 6f7f1b7627bc
child 807 a33a5f760372
     1.1 --- a/sync/gen_actions_skeleton.ysl2	Tue Jun 14 10:42:07 2016 +0200
     1.2 +++ b/sync/gen_actions_skeleton.ysl2	Thu Jun 16 14:20:26 2016 +0200
     1.3 @@ -130,6 +130,7 @@
     1.4              «$name»_t *msg = NULL;
     1.5              char *payload = NULL;
     1.6              message *_message = NULL;
     1.7 +            pEp_identity *me = NULL;
     1.8  
     1.9              `` call "paramcheck" with "partner", "parm/partner";
    1.10  
    1.11 @@ -150,7 +151,7 @@
    1.12  
    1.13              msg->state = (long) state;
    1.14  
    1.15 -            pEp_identity *me = new_identity(NULL, NULL, NULL, NULL);
    1.16 +            me = new_identity(NULL, NULL, NULL, NULL);
    1.17              if (!me)
    1.18                  goto enomem;
    1.19              status = myself(session, me);
    1.20 @@ -185,6 +186,9 @@
    1.21                  goto error;
    1.22              payload = NULL;
    1.23  
    1.24 +            free_identity(me);
    1.25 +            me = NULL;
    1.26 +
    1.27              status = session->messageToSend(session->sync_obj, _message);
    1.28  
    1.29              free_message(_message);
    1.30 @@ -198,6 +202,7 @@
    1.31              ASN_STRUCT_FREE(asn_DEF_«$name», msg);
    1.32              free(payload);
    1.33              free_message(_message);
    1.34 +            free_identity(me);
    1.35              return status;
    1.36          }
    1.37