==Updating==
Memory leak issues:
char ** arg = calloc(1, sizeof(char *));
arg[0] = calloc(10, sizeof(char));
arg[0] = NULL;
free(arg); // MEMORY LEAK!
Rewriting to a freed memory block.
In some weird cases, the programme will run smoothly for several steps (writing) and then throw a segmentation fault error.
Always draw a diagram for the changes you made.
原文:https://www.cnblogs.com/manqing/p/10448860.html