summaryrefslogtreecommitdiff
path: root/fitz/filt_faxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/filt_faxd.c')
-rw-r--r--fitz/filt_faxd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c
index e4a81724..dd6ac9d0 100644
--- a/fitz/filt_faxd.c
+++ b/fitz/filt_faxd.c
@@ -549,7 +549,6 @@ readfaxd(fz_stream *stm, unsigned char *buf, int len)
unsigned char *ep = buf + len;
unsigned char *tmp;
fz_error error;
- int i;
if (fax->stage == SDONE)
return 0;
@@ -692,12 +691,6 @@ eol:
rtc:
fax->stage = SDONE;
-
- /* try to put back any extra bytes we read */
- i = (32 - fax->bidx) / 8;
- while (i--)
- fz_unreadbyte(fax->chain);
-
return p - buf;
}
@@ -705,6 +698,13 @@ static void
closefaxd(fz_stream *stm)
{
fz_faxd *fax = stm->state;
+ int i;
+
+ /* if we read any extra bytes, try to put them back */
+ i = (32 - fax->bidx) / 8;
+ while (i--)
+ fz_unreadbyte(fax->chain);
+
fz_close(fax->chain);
fz_free(fax->ref);
fz_free(fax->dst);