Plug memory leak.
PR: 27506
This commit is contained in:
parent
464c61a9a4
commit
613c2fe91b
@ -418,13 +418,10 @@ _ftp_closefn(void *v)
|
|||||||
io->dir = -1;
|
io->dir = -1;
|
||||||
io->dsd = -1;
|
io->dsd = -1;
|
||||||
DEBUG(fprintf(stderr, "Waiting for final status\n"));
|
DEBUG(fprintf(stderr, "Waiting for final status\n"));
|
||||||
if ((r = _ftp_chkerr(io->csd)) != FTP_TRANSFER_COMPLETE)
|
r = _ftp_chkerr(io->csd);
|
||||||
io->err = r;
|
|
||||||
else
|
|
||||||
io->err = 0;
|
|
||||||
close(io->csd);
|
close(io->csd);
|
||||||
io->csd = -1;
|
free(io);
|
||||||
return io->err ? -1 : 0;
|
return (r == FTP_TRANSFER_COMPLETE) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FILE *
|
static FILE *
|
||||||
|
Loading…
Reference in New Issue
Block a user