--- freem/src/cmd_write.c 2025/03/24 04:05:36 1.5 +++ freem/src/cmd_write.c 2025/04/09 19:52:02 1.6 @@ -1,5 +1,5 @@ /* - * $Id: cmd_write.c,v 1.5 2025/03/24 04:05:36 snw Exp $ + * $Id: cmd_write.c,v 1.6 2025/04/09 19:52:02 snw Exp $ * Implementation of the WRITE command * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: cmd_write.c,v $ + * Revision 1.6 2025/04/09 19:52:02 snw + * Eliminate as many warnings as possible while building with -Wall + * * Revision 1.5 2025/03/24 04:05:36 snw * Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 * @@ -58,11 +61,14 @@ MRESULT cmd_write(MACTION *ra, int *i) if (io > FIRSTSCK) msck_get_terminator (io, wr_terminator); if (io != HOME && devopen[io] == 'r' && io < FIRSTSCK) { + free (wr_terminator); free (sw_buf); return NOWRITE; } if ((*i = (*codptr)) == SP || *i == EOL) { + free (wr_terminator); + free (sw_buf); return ARGLIST; }