Fix crash when cc_link is removed

This commit is contained in:
Andreas Eversberg 2023-08-06 13:11:29 +02:00
parent b23325eba5
commit c8a38acaec
1 changed files with 7 additions and 1 deletions

View File

@ -294,8 +294,14 @@ int ph_data_req_hdlc(struct msgb *msg, struct v5x_interface *v5if)
int ph_data_req_dl_cc(struct msgb *msg, void *cbdata)
{
struct v5x_interface *v5if = (struct v5x_interface *)cbdata;
struct e1inp_line *e1_line = v5if->cc_link->e1_line;
struct e1inp_line *e1_line;
if (!v5if->cc_link) {
msgb_free(msg);
return 0;
}
e1_line = v5if->cc_link->e1_line;
if (!e1_line) {
msgb_free(msg);
return 0;