in pop_cell, free memory we allocated if we're returning NULL