pstore/ram: Fix possible NULL dereference