I would try using trap_TrueMalloc and trap_TrueFree, best methods that I know of. And can be used from all of the modules.
g_sess is clientSession * and trueMalloc wants the first arg to be a void **, second arg is the size you wish to alloc.
trap_TrueMalloc( (void **)&g_sess, g_maxclients.integer * sizeof( clientSession_t ) );
argument is the pointer you are freeing from truemalloc and again wants **
trap_TrueFree( (void **)&g_sess );
you really do not need (void **) but gcc likes to be picky about those kinds of things.