--- libaitrpc/src/srv.c 2012/05/17 16:43:21 1.9.2.27 +++ libaitrpc/src/srv.c 2012/05/17 16:47:35 1.9.2.28 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.9.2.27 2012/05/17 16:43:21 misho Exp $ +* $Id: srv.c,v 1.9.2.28 2012/05/17 16:47:35 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -62,7 +62,9 @@ closeClient(sched_task_t *task) /* free buffer */ AIT_FREE_VAL(&c->cli_buf); - io_arrayDel(s->srv_clients, c->cli_id, 42); + io_arrayDel(s->srv_clients, c->cli_id, 0); + if (c) + free(c); return NULL; } @@ -314,7 +316,9 @@ closeBLOBClient(sched_task_t *task) /* free buffer */ AIT_FREE_VAL(&c->cli_buf); - io_arrayDel(s->srv_blob.clients, c->cli_id, 42); + io_arrayDel(s->srv_blob.clients, c->cli_id, 0); + if (c) + free(c); return NULL; }