fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31939 )
Change subject: fix bs11_read_swl_file(): properly clean up stale file list ...................................................................... fix bs11_read_swl_file(): properly clean up stale file list Calling talloc_free() on struct llist_head is wrong and will lead to unexpected behavior. Call it on the containing struct instead. Change-Id: Ib5eaa328aaf6881ae9621ca14859e4e255af2b00 --- M src/osmo-bsc/abis_nm.c 1 file changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/31939/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 938f45d..95cb858 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -2645,8 +2645,8 @@ static int bs11_read_swl_file(struct abis_nm_bs11_sw *bs11_sw) { + struct file_list_entry *fle; char linebuf[255]; - struct llist_head *lh, *lh2; FILE *swl; int rc = 0; @@ -2655,10 +2655,8 @@ return -ENODEV; /* zero the stale file list, if any */ - llist_for_each_safe(lh, lh2, &bs11_sw->file_list) { - llist_del(lh); - talloc_free(lh); - } + while ((fle = fl_dequeue(&bs11_sw->file_list))) + talloc_free(fle); while (fgets(linebuf, sizeof(linebuf), swl)) { char file_id[12+1]; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib5eaa328aaf6881ae9621ca14859e4e255af2b00 Gerrit-Change-Number: 31939 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanits...@sysmocom.de> Gerrit-MessageType: newchange