--- ansh/src/client2.c 2012/01/23 10:34:12 1.3 +++ ansh/src/client2.c 2012/07/22 22:41:33 1.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: client2.c,v 1.3 2012/01/23 10:34:12 misho Exp $ + * $Id: client2.c,v 1.4 2012/07/22 22:41:33 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -84,13 +84,13 @@ ConnectL2(int h, io_ether_addr_t *ea, int len) FTRACE(3); - if (!(buf = malloc(len))) { + if (!(buf = io_malloc(len))) { printf("Error:: no enough memory #%d - %s\n", errno, strerror(errno)); return -1; } if (SetRemoteWinz(h, ea, buf, len) == -1) { - free(buf); + io_free(buf); return -1; } @@ -183,6 +183,6 @@ ConnectL2(int h, io_ether_addr_t *ea, int len) } ioRestoreMode(STDIN_FILENO, otio); - free(buf); + io_free(buf); return ret; }