cbsp/sbcap: Fix memleak in error condition (tx without link)
Change-Id: I95f6ab4e642529afc583b0747450b83af1e8f32e
This commit is contained in:
parent
041ae3246d
commit
20705a0877
|
@ -325,6 +325,7 @@ int cbc_cbsp_link_tx(struct cbc_cbsp_link *link, struct osmo_cbsp_decoded *cbsp)
|
|||
if (!link) {
|
||||
LOGP(DCBSP, LOGL_NOTICE, "Cannot transmit %s: no connection\n",
|
||||
get_value_string(cbsp_msg_type_names, cbsp->msg_type));
|
||||
talloc_free(cbsp);
|
||||
return -ENOLINK;
|
||||
}
|
||||
|
||||
|
|
|
@ -392,7 +392,8 @@ int cbc_sbcap_link_tx(struct cbc_sbcap_link *link, SBcAP_SBC_AP_PDU_t *pdu)
|
|||
if (!link) {
|
||||
LOGP(DSBcAP, LOGL_NOTICE, "Cannot transmit msg %s: no connection\n",
|
||||
sbcap_pdu_get_name(pdu));
|
||||
return -ENOLINK;
|
||||
rc = -ENOLINK;
|
||||
goto ret_free;
|
||||
}
|
||||
|
||||
LOGPSBCAPC(link, LOGL_INFO, "Tx msg %s\n",
|
||||
|
|
Loading…
Reference in New Issue