Sed, circa like 1021. The "N" case. if (next_line == NULL) { /* Jump to end of script and exist */ deleted = 1; free(next_line); I.E. If it was already null, free it. (Just to be sure?) Rob