Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
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.