oom: fix NULL pointer dereference