From c4c3a856adf5c9a65acf7f8efa6b5f7362bdbeaa Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 16 Sep 2022 19:24:07 +0200 Subject: [PATCH] ipaccess: Call line->ops->sign_link_down() only if set This op must not necessarily be set by the user, so check if it is set before calling it. Change-Id: I666c5bbf157fe604e336df44f7eac098572d42ba --- src/input/ipaccess.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 94d2baf..42dd942 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -123,7 +123,8 @@ static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line) e1i_ts->pending_msg = NULL; /* e1inp_sign_link_destroy releases the socket descriptors for us. */ - line->ops->sign_link_down(line); + if (line->ops->sign_link_down) + line->ops->sign_link_down(line); e1inp_line_put2(line, __func__); return ret;