aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-31 12:55:01 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-07-31 12:55:05 +0200
commitf6d812b8821efcdf2024518a55db588d94988540 (patch)
tree25fa751f23e8f7929bd78433edd7ba558934d56a
parent8fc8ceff16aa1fdd3b0b6bdcc7659ad7ba7ad591 (diff)
WIP: ipaccess: Fix use-after-free in ipaccess_droppespin/fix-free
Detected by enabling ASan and running BSC_Tests.TC_chopped_ipa_ping TTCN3 test. Related: OS#4688 Change-Id: I4f56af28ad8297846bcdc8ba7afe51fff0f9a00f
-rw-r--r--src/input/ipaccess.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index d81191c..30bcaf9 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -82,6 +82,7 @@ static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line)
{
int ret = 1;
struct e1inp_ts *e1i_ts = ipaccess_line_ts(bfd, line);
+ e1inp_line_get2(line, __func__);
ipaccess_keepalive_fsm_cleanup(e1i_ts);
@@ -108,6 +109,7 @@ static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line)
/* e1inp_sign_link_destroy releases the socket descriptors for us. */
line->ops->sign_link_down(line);
+ e1inp_line_put2(line, __func__);
return ret;
}