staging: wfx: check memory allocation