Just fixed a potential memory corruption bug detected by #scan-build (delete/free mismatch).
If your project compiles with #clang/clang++, invocation can be as easy as:
$ scan-build make
There may be lots of output generated, but catching bugs like the above *before* it's actually triggered make it really worthwhile to plow through the warnings.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!