What I meant was that before the next line (where we overwrite prog_name), we would have to free the old value of prog_name in order to not leak memory. Due to the fact that prog_name has been assigned to prog_argv[0] above, we must not free() that memory, as otherwise prog_argv[0] is freed and lost.