Improve the code by static code analysis [1/3]: Bug fixes
Using the results cppcheck gave on the aMule source tree, the following fixes
were made:
- Fix possible memory leaks:
- Mismatching allocation/deallocation.
- A common realloc() mistake: on failure the result is nulled but not freed.
- Fix resource leaks.
- Fix misused code paths (missing break on a case label).
- Fix reusing invalidated iterators.
- Fix possible NULL pointer dereferences.
- Remove unreachable code (break after throw).
- Fix: scanf() without field width specifications may crash on huge input.
Also regenerated the parsers and lexical scanners.
32 files changed: