Tai-hwa Liang
e7356456ed
Nuking the temporary pointer once it is properly tracked in local storage.
...
This should fix the double free() bug where there's no tailing newline(\n)
character:
current# echo -n test | tail
testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function
arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448.
Abort (core dumped)
Reviewed by: kib
MFC after: 3 days
2007-11-22 01:51:46 +00:00
Philippe Charnier
f8c2d2bde1
initialize variables, WARNS=6 compliant
2007-11-02 18:06:51 +00:00
Konstantin Belousov
7ce8354a9b
Fix various memory leaks.
...
Submitted by: rdivacky
Obtained from: OpenBSD
MFC after: 1 week
2007-10-17 09:52:08 +00:00
Paul Richards
4bba8e595e
Convert to ANSI style function definitions.
2004-11-03 15:23:11 +00:00
Mark Murray
96b5910f32
Revert part of the last commit. This fixes tail for pipes.
...
Submitted by: joerg
2003-06-10 16:49:14 +00:00
Mark Murray
814e3a92a9
WARNS=2 fixes, use __FBSDID().
2001-12-12 00:01:16 +00:00
Jeroen Ruigrok van der Werven
48a1ef2284
Remove register keyword usage with prejudice.
...
Modern compilers are smarter when it comes to allocating register
usage.
2000-12-03 17:05:45 +00:00
Jeroen Ruigrok van der Werven
247e7cb1d3
Properly constify some static arrays.
...
Also #if out some sccsid's and add rcsid's.
2000-12-02 19:10:12 +00:00
Peter Wemm
c3fd5728c2
Dont forget to #include <err.h>
1996-08-25 21:14:19 +00:00
Peter Wemm
ac5512704d
Argh! caught! *blush*.. This program was supplying it's own 'err' routine
...
which was slightly different to the libc one. To save any more cunfusion,
use the libc one.
1996-08-25 21:12:01 +00:00
Adam David
6439f56e80
one file somehow slipped by me in the previous commit
...
tidy up
1996-07-30 15:44:30 +00:00
Adam David
49a598ab87
when file can be opened for read but cannot be read from:
...
fail once (was twice) in forward case
fail once (was no times) in reverse case
this can happen when file is a directory on an NFS or procfs mount.
1996-07-30 13:11:43 +00:00
Poul-Henning Kamp
f96ffb5acb
Another program depending on zero'ed malloc.
...
Submitted by: Kai Vorma <vode@snakemail.hut.fi>
1995-10-10 10:03:48 +00:00
Rodney W. Grimes
9b50d90275
BSD 4.4 Lite Usr.bin Sources
1994-05-27 12:33:43 +00:00