handle OOM situation in list.c