fix more memory leaks regarding OBJECT_IDENTIFIER and ANY types
This commit is contained in:
parent
fa4f469558
commit
19f4897e34
|
@ -104,6 +104,9 @@ int tcap_csl_tc_uni_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx,
|
|||
|
||||
ANY_fromType(any, &asn_DEF_ExternalPDU, ext);
|
||||
tcm->choice.unidirectional.dialoguePortion = (OCTET_STRING_t *) any;
|
||||
|
||||
asn_DEF_OBJECT_IDENTIFIER.free_struct(&asn_DEF_OBJECT_IDENTIFIER, app_ctx, 0);
|
||||
asn_DEF_ANY.free_struct(&asn_DEF_ANY, &ext->dialog, 1);
|
||||
}
|
||||
/* Request components to CHA */
|
||||
pend_comp = tcap_cha_req_components(td);
|
||||
|
@ -163,6 +166,9 @@ int tcap_csl_tc_begin_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx
|
|||
|
||||
ANY_fromType(any, &asn_DEF_ExternalPDU, ext);
|
||||
tcm->choice.begin.dialoguePortion = (OCTET_STRING_t *) any;
|
||||
|
||||
asn_DEF_OBJECT_IDENTIFIER.free_struct(&asn_DEF_OBJECT_IDENTIFIER, app_ctx, 0);
|
||||
asn_DEF_ANY.free_struct(&asn_DEF_ANY, &ext->dialog, 1);
|
||||
}
|
||||
/* Request components to CHA */
|
||||
/* Process components */
|
||||
|
@ -336,10 +342,12 @@ static ANY_t *gen_ext_AARE(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ct
|
|||
/* Link Dialogue into External PDU */
|
||||
printf("calling ANY_fromType(%p, %p, %p)\n", &ext->dialog, &asn_DEF_DialoguePDU, dial);
|
||||
rc = ANY_fromType((ANY_t *) &ext->dialog, &asn_DEF_DialoguePDU, dial);
|
||||
asn_DEF_OBJECT_IDENTIFIER.free_struct(&asn_DEF_OBJECT_IDENTIFIER, app_ctx, 0);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "Error generating ExternalPDU from DialoguePDU\n");
|
||||
return NULL;
|
||||
}
|
||||
asn_DEF_ANY.free_struct(&asn_DEF_ANY, &ext->dialog, 1);
|
||||
/* Link External PDU into Dialogue Portion */
|
||||
rc = ANY_fromType(any, &asn_DEF_ExternalPDU, ext);
|
||||
if (rc < 0) {
|
||||
|
@ -399,7 +407,7 @@ int tcap_csl_tc_cont_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx,
|
|||
|
||||
tcap_trans_set_state(&td->trans, TCAP_TS_ACTIVE);
|
||||
|
||||
asn_DEF_ANY.free_struct(&asn_DEF_ANY, any, 0);
|
||||
asn_DEF_TCMessage.free_struct(&asn_DEF_TCMessage, &tcm, 1);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -457,7 +465,8 @@ int tcap_csl_tc_end_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx,
|
|||
|
||||
/* TR-END.req to TSL */
|
||||
rc = tcap_tco_tr_end_req(&td->trans, &tcm);
|
||||
asn_DEF_ANY.free_struct(&asn_DEF_ANY, any, 0);
|
||||
asn_DEF_TCMessage.free_struct(&asn_DEF_TCMessage, &tcm, 1);
|
||||
|
||||
/* Dialogue terminated to CHA */
|
||||
tcap_cha_dialg_term(td);
|
||||
/* Free Dialogue ID */
|
||||
|
|
Loading…
Reference in New Issue