]> code.delx.au - gnu-emacs/blobdiff - lib-src/yow.c
Delete traces of leditcfns.c.
[gnu-emacs] / lib-src / yow.c
index 9d58ce5aecb352f21bf9a3cf1d688b88f46f3281..18f0f7b2e13440058365e88c1c6a6d2b2e2fe085 100644 (file)
@@ -104,7 +104,7 @@ setup_yow(fp)
   while ((c = getc(fp)) != SEP) {
     if (c == EOF) {
       fprintf(stderr, "yow: file contains no separators\n");
-      exit(2);
+      exit(EXIT_FAILURE);
     }
   }
   header_len = ftell(fp);
@@ -157,7 +157,7 @@ yow (fp)
   buf = (char *) malloc(bufsize);
   if (buf == (char *)0) {
     fprintf(stderr, "yow: virtual memory exhausted\n");
-    exit (3);
+    exit (EXIT_FAILURE);
   }
 
   buf[i++] = c;
@@ -170,12 +170,13 @@ yow (fp)
       buf = (char *) realloc(buf, bufsize);
       if (buf == (char *)0) {
        fprintf(stderr, "yow: virtual memory exhausted\n");
-       exit (3);
+       exit (EXIT_FAILURE);
       }
     }
   }
   buf[i++] = 0;
   printf("%s\n", buf);
+  free (buf);
 }
 
 /* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e