Fixing access after free.
Pocl wasn't able to compile this kernel.