AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
8 stars 6 forks source link

chan_echolink: Address problem with maintaining the internal database #203

Closed KB4MDD closed 1 year ago

KB4MDD commented 1 year ago

chan_echolink crashed when it received a request from the echolink server to process a full directory. chan_echolink attempted to free the three internal binary trees and ran into a problem with a double free. The node had already been freed but not removed from the binary tree.

There was an issue with one of the trees. The delete routine was not finding the entry and leaving it in the tree. This could be unrelated to the problem being report, it however represented a memory leak and a problem.

I consolidated some of the tree delete code into one routine. This eliminated one routine and associated call.

While I was making changes, I addressed the issue with several char fields were being defined by size plus 1. The 'define' that was used already contained the necessary size to include the trailing null character.

I replaced several uses of the define with the sizeof operator, as recommended.

This closes #196.