deal with malloc fail