--- libaitsched/src/aitsched.c 2015/07/22 19:50:45 1.28 +++ libaitsched/src/aitsched.c 2022/10/03 22:16:36 1.28.14.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.28 2015/07/22 19:50:45 misho Exp $ +* $Id: aitsched.c,v 1.28.14.1 2022/10/03 22:16:36 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2015 +Copyright 2004 - 2022 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -215,7 +215,7 @@ schedInit(void ** __restrict data, size_t datlen) register int i; #endif - root = malloc(sizeof(sched_root_task_t)); + root = e_malloc(sizeof(sched_root_task_t)); if (!root) { LOGERR; } else { @@ -233,7 +233,7 @@ schedInit(void ** __restrict data, size_t datlen) LOGERR; while (i) pthread_mutex_destroy(&root->root_mtx[--i]); - free(root); + e_free(root); return NULL; } @@ -373,7 +373,7 @@ schedEnd(sched_root_task_t ** __restrict root) SCHED_QLOCK((*root), taskUNUSE); TAILQ_FOREACH_SAFE(task, &(*root)->root_unuse, task_node, tmp) { TAILQ_REMOVE(&(*root)->root_unuse, task, task_node); - free(task); + e_free(task); } SCHED_QUNLOCK((*root), taskUNUSE); @@ -388,7 +388,7 @@ schedEnd(sched_root_task_t ** __restrict root) } #endif - free(*root); + e_free(*root); *root = NULL; return 0; }