memory: ensure to check allocation results #3084
The result of a memory allocation should always be checked, as we may run under memory pressure where even a small allocation can fail. This adds checking and error handling to a few cases where the allocation wasn't checked for success. Also bumps the copyright years on affected files.
This is based on manual static analysis/code reading, no live bugs have been observed.
Right, I was mainly following the style of the surrounding code there, to make the flow easier to read.
Nice catch, have pushed a fixup commit with this.