What if malloc fails?

前端 未结 10 594
轮回少年
轮回少年 2020-12-09 08:57

If a malloc allocation fails, should we try it again?

In something like this:

char* mystrdup(const char *s)  
{
    char *ab = NULL;

           


        
10条回答
提交回复
热议问题