--- ansh/src/client3.c 2012/01/23 10:34:12 1.3 +++ ansh/src/client3.c 2012/05/23 15:41:38 1.3.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: client3.c,v 1.3 2012/01/23 10:34:12 misho Exp $ + * $Id: client3.c,v 1.3.2.1 2012/05/23 15:41:38 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -86,13 +86,13 @@ ConnectL3(int h, u_short id, io_sockaddr_t *sa, int le 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, id, sa, buf, len) == -1) { - free(buf); + io_free(buf); return -1; } @@ -136,7 +136,7 @@ ConnectL3(int h, u_short id, io_sockaddr_t *sa, int le str = cryptBuffer(buf, rlen, Crypted); if (str) { memcpy(buf, str, rlen); - free(str); + io_free(str); } } @@ -189,7 +189,7 @@ ConnectL3(int h, u_short id, io_sockaddr_t *sa, int le str = cryptBuffer(buf, rlen, Crypted); if (str) { memcpy(buf, str, rlen); - free(str); + io_free(str); } } @@ -202,6 +202,6 @@ ConnectL3(int h, u_short id, io_sockaddr_t *sa, int le } ioRestoreMode(STDIN_FILENO, otio); - free(buf); + io_free(buf); return ret; }