| Summary: | memory leak in libfetch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | thierry <thierry> | ||||
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
thierry
2001-05-21 17:30:01 UTC
Responsible Changed From-To: freebsd-bugs->des Over to the libfetch author/maintainer. Try this patch instead of the one in the PR:
Index: ftp.c
===================================================================
RCS file: /home/ncvs/src/lib/libfetch/ftp.c,v
retrieving revision 1.63
diff -u -r1.63 ftp.c
--- ftp.c 2001/04/24 00:06:20 1.63
+++ ftp.c 2001/05/21 17:58:31
@@ -418,13 +418,10 @@
io->dir = -1;
io->dsd = -1;
DEBUG(fprintf(stderr, "Waiting for final status\n"));
- if ((r = _ftp_chkerr(io->csd)) != FTP_TRANSFER_COMPLETE)
- io->err = r;
- else
- io->err = 0;
+ r = _ftp_chkerr(io->csd);
close(io->csd);
- io->csd = -1;
- return io->err ? -1 : 0;
+ free(io);
+ return (r == FTP_TRANSFER_COMPLETE) ? 0 : -1;
}
static FILE *
DES
--
Dag-Erling Smorgrav - des@ofug.org
State Changed From-To: open->feedback State Changed From-To: feedback->closed Fixed in -CURRENT and -STABLE. |