summaryrefslogtreecommitdiff
path: root/ftp.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-03-22 16:23:05 +0000
committerjbj <devnull@localhost>1999-03-22 16:23:05 +0000
commit7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d (patch)
tree28abbf570d97285d9900655c30f8acd417ec062a /ftp.c
parent2f5f89f2a3a974ce54f4670edc91c2b56e0b2551 (diff)
downloadrpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.tar.gz
rpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.tar.bz2
rpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.zip
fix: segfault from double close on ftpGetFileDesc ftpAbort path.
CVS patchset: 2908 CVS date: 1999/03/22 16:23:05
Diffstat (limited to 'ftp.c')
-rw-r--r--ftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ftp.c b/ftp.c
index 17c2f5eef..2e6fcb7f9 100644
--- a/ftp.c
+++ b/ftp.c
@@ -500,9 +500,11 @@ fprintf(stderr, "-> ABOR\n");
}
static int ftpGetFileDone(urlinfo *u) {
- if (u->ftpGetFileDoneNeeded && ftpCheckResponse(u, NULL))
- return FTPERR_BAD_SERVER_RESPONSE;
- u->ftpGetFileDoneNeeded = 0;
+ if (u->ftpGetFileDoneNeeded) {
+ u->ftpGetFileDoneNeeded = 0;
+ if (ftpCheckResponse(u, NULL))
+ return FTPERR_BAD_SERVER_RESPONSE;
+ }
return 0;
}