fix use after free in bsc_config_free
talloc_free the cfg only after asserting num_bsc count sanity. This caused a failure in the 'bsc-nat' test with -fsanitize build. Should fix the Osmocom_Sanitizer build on jenkins.osmocom.org https://jenkins.osmocom.org/jenkins/job/Osmocom_Sanitizer/ Change-Id: Ic20aacaccffcaa58ccec6d24c884727dc1bc50e6
This commit is contained in:
parent
b4ecc1d43b
commit
194b4cb4fd
|
@ -205,9 +205,9 @@ void bsc_config_free(struct bsc_config *cfg)
|
|||
{
|
||||
llist_del(&cfg->entry);
|
||||
rate_ctr_group_free(cfg->stats.ctrg);
|
||||
talloc_free(cfg);
|
||||
cfg->nat->num_bsc--;
|
||||
OSMO_ASSERT(cfg->nat->num_bsc >= 0)
|
||||
talloc_free(cfg);
|
||||
}
|
||||
|
||||
static void _add_lac(void *ctx, struct llist_head *list, int _lac)
|
||||
|
|
Loading…
Reference in New Issue