mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
[nat] Separate exit2/exit3 as this can not be shared...
We have tried to send a refuse for arbitary things and ended up with a segfault... separate the exi2 and exit3 label to have separate exits and cleanups.
This commit is contained in:
@@ -670,6 +670,11 @@ exit:
|
||||
goto exit2;
|
||||
}
|
||||
|
||||
exit2:
|
||||
talloc_free(parsed);
|
||||
msgb_free(msg);
|
||||
return -1;
|
||||
|
||||
exit3:
|
||||
/* send a SCCP Connection Refused */
|
||||
refuse = sccp_create_refuse(parsed->src_local_ref, SCCP_REFUSAL_SCCP_FAILURE);
|
||||
@@ -677,7 +682,7 @@ exit3:
|
||||
bsc_send_data(bsc, refuse->l2h, msgb_l2len(refuse), IPAC_PROTO_SCCP);
|
||||
msgb_free(refuse);
|
||||
}
|
||||
exit2:
|
||||
|
||||
talloc_free(parsed);
|
||||
msgb_free(msg);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user