diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-12 23:52:34 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-12 23:52:34 +0000 |
| commit | 4e17605909eddc8392aa47fe76cf345e802c8e2f (patch) | |
| tree | 743c018bfca007bf8be907099ff9a58abd4fd2c1 /lib/libc/gen/getttyent.c | |
| parent | 35aa820e3571f17a4ae6f25c1ee6733db2904bae (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/getttyent.c')
| -rw-r--r-- | lib/libc/gen/getttyent.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index 2cd965dceab5..5d40ac9941f6 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -207,11 +207,10 @@ endttyent() { int rval; - if (line) { - free(line); - line = NULL; - lbsize = 0; - } + /* + * NB: Don't free `line' because getttynam() + * may still be referencing it + */ if (tf) { rval = (fclose(tf) != EOF); tf = NULL; |
