Fix crash when cc_link is removed
This commit is contained in:
parent
b23325eba5
commit
c8a38acaec
|
@ -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)
|
int ph_data_req_dl_cc(struct msgb *msg, void *cbdata)
|
||||||
{
|
{
|
||||||
struct v5x_interface *v5if = (struct v5x_interface *)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) {
|
if (!e1_line) {
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue