]> diplodocus.org Git - nmh/blobdiff - uip/mhoutsbr.c
pending-release-notes: add mhshow's "-prefer", and mh-format's %(kibi/kilo)
[nmh] / uip / mhoutsbr.c
index b672de77a4e7a552124691bbe2fdf9dc93996b53..0c0a29759aae3061d79015500eba96bcc937782d 100644 (file)
@@ -317,7 +317,9 @@ write8Bit (CT ct, FILE *out)
     c = '\n';
     while ((inbytes = fread (buffer, 1, sizeof buffer, ce->ce_fp)) > 0) {
         c = buffer[inbytes - 1];
-        fwrite (buffer, 1, inbytes, out);
+        if (fwrite (buffer, 1, inbytes, out) < inbytes) {
+            advise ("write8Bit", "fwrite");
+        }
     }
     if (c != '\n')
        putc ('\n', out);
@@ -405,6 +407,7 @@ three_print:
        putc ('\n', out);
 
     (*ct->c_ceclosefnx) (ct);
+    free (bufp);
     return OK;
 }