In the Linux kernel, the following vulnerability has been resolved:
Fix memory leak in posixclockopen()
If the clk ops.open() function returns an error, we don't release the pccontext we allocated for this clock.
Re-organize the code slightly to make it all more obvious.