This is exactly what I wrote block allocator for. :-)
However, the code completion parser was later made multithreaded in an attempt to speed it up, and the block allocator is (obviously) not thread-safe. Well, in fact it is thread safe, but not concurrency safe. Two threads allocating at the exact same time may get the same block of valid memory, and two blocks freeing at the exact same time may leak a block of memory.
So, your patch will likely work, but not 100% reliably. To make the block allocator thread-safe, one would have to use an atomic compare/exchange for the single-linked list of free nodes, but then again, this would make it slower.