diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-09-27 06:25:47 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-09-27 06:25:47 +0000 |
commit | 2e4d237b53f691d580df9a793dd03bf36c8e6d80 (patch) | |
tree | c3deab5b33d41ee95baaa4c385475b277f8ccecf /usr.bin/rcs | |
parent | 23b82cc4d8608a4584bbaa1e6a7485f1e75ca0ce (diff) |
Plug memory leak.
OK niallo@.
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r-- | usr.bin/rcs/diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rcs/diff.c b/usr.bin/rcs/diff.c index 8b837fb4ef9..b5aa4f15729 100644 --- a/usr.bin/rcs/diff.c +++ b/usr.bin/rcs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.9 2006/09/21 15:30:07 millert Exp $ */ +/* $OpenBSD: diff.c,v 1.10 2006/09/27 06:25:46 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -863,6 +863,7 @@ preadline(int fd, size_t rlen, off_t off) line = xmalloc(rlen + 1); if ((nr = pread(fd, line, rlen, off)) < 0) { warn("preadline failed"); + xfree(line); return (NULL); } line[nr] = '\0'; |