Closed hzylyq closed 3 years ago
I have a question.
if ((head->line = malloc(linecap)) == NULL) { fprintf(stderr, "reverse: malloc failed\n"); exit(EXIT_FAILURE); } when malloc failed. head won't be free
if ((head->line = malloc(linecap)) == NULL) { fprintf(stderr, "reverse: malloc failed\n"); exit(EXIT_FAILURE); }
Thanks!
I have a question.
if ((head->line = malloc(linecap)) == NULL) { fprintf(stderr, "reverse: malloc failed\n"); exit(EXIT_FAILURE); }
when malloc failed. head won't be free